Skip to content

Commit

Permalink
fix: prevent user from sending empty messages (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
haansn08 authored Nov 14, 2024
1 parent 6f72e7a commit c640219
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/Sendbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ export default {
await this.postFile(this.file)
return
}
if (this.composingMessage.trim() === '') {
// do not send empty messages
return
}
await this.$xmpp.sendMessage(this.activeChat, this.composingMessage, this.isRoom)
this.composingMessage = ''
} catch (error) {
Expand Down

0 comments on commit c640219

Please sign in to comment.