message-toolbar: Prevent sending empty messages
This commit is contained in:
parent
f358b0bb25
commit
09fb83a27c
1 changed files with 5 additions and 0 deletions
|
@ -558,6 +558,11 @@ impl MessageToolbar {
|
|||
formatted_body.replace_range(.."/me ".len(), "");
|
||||
}
|
||||
|
||||
if plain_body.trim().is_empty() {
|
||||
// Don't send empty message.
|
||||
return;
|
||||
}
|
||||
|
||||
let html_body = if is_markdown {
|
||||
FormattedBody::markdown(formatted_body).map(|b| b.body)
|
||||
} else if has_mentions {
|
||||
|
|
Loading…
Reference in a new issue