소스 검색

fix: allow empty text if message input has attachments

ayn2op 5 달 전
부모
커밋
845485595f
1개의 변경된 파일1개의 추가작업 그리고 4개의 파일을 삭제
  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()