Fix messages mistakenly treated as /me command (#872)

Per XEP-0245 only messages that start with "/me " (with the trailing
space) should treated as 3rd person actions.
This commit is contained in:
Kim Alvefur 2020-07-02 11:51:30 +02:00 committed by GitHub
parent 2824dedd22
commit 23c0216853
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -157,7 +157,7 @@ public class MessageItemWidget : SizeRequestBin {
markup_text = markup_text.substring(0, 10000) + " [" + _("Message too long") + "]"; markup_text = markup_text.substring(0, 10000) + " [" + _("Message too long") + "]";
} }
if (message.body.has_prefix("/me ")) { if (message.body.has_prefix("/me ")) {
markup_text = markup_text.substring(3); markup_text = markup_text.substring(4);
} }
if (conversation.type_ == Conversation.Type.GROUPCHAT) { if (conversation.type_ == Conversation.Type.GROUPCHAT) {