Explorar o código

fix: allow empty text if message input has attachments

ayn2op hai 5 meses
pai
achega
845485595f
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  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()