Skip to content

Commit

Permalink
Do not let the client send empty messages
Browse files Browse the repository at this point in the history
To be fair, these should probably be rejected by the server too.
  • Loading branch information
OmniTroid committed Nov 10, 2023
1 parent abfee84 commit 41b7acd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions webAO/dom/onEnter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ export function onEnter(event: KeyboardEvent) {
emote_mod = 0;
}

// Never send empty messages
if (text === '') {
return false;
}

client.sender.sendIC(
myemo.deskmod,
myemo.preanim,
Expand Down

0 comments on commit 41b7acd

Please sign in to comment.