Răsfoiți Sursa

fix: allow empty text if message input has attachments

ayn2op 5 luni în urmă
părinte
comite
845485595f
1 a modificat fișierele cu 1 adăugiri și 4 ștergeri
  1. 1 4
      cmd/message_input.go

+ 1 - 4
cmd/message_input.go

@@ -160,14 +160,11 @@ func (mi *messageInput) send() {
 	}
 
 	text := strings.TrimSpace(mi.GetText())
-	if text == "" {
+	if text == "" && len(mi.sendMessageData.Files) == 0 {
 		return
 	}
 
 	text = processText(app.chatView.selectedChannelID, []byte(text))
-	if text == "" {
-		return
-	}
 
 	if mi.edit {
 		m, err := app.chatView.messagesList.selectedMessage()