core (xmpp): don't send message without message or subject to bridge (and log a warning in frontends if such a message is received)

This commit is contained in:
Goffi 2019-01-02 18:28:30 +01:00
commit c2a1ba3793

View file

@ -584,6 +584,11 @@ class QuickChat(quick_widgets.QuickWidget):
profile,
)
return
if not msg and not subject and type_ != C.MESS_TYPE_INFO:
log.warning(u"Received an empty message for uid {}".format(uid))
return
if self.type == C.CHAT_GROUP:
if to_jid.resource and type_ != C.MESS_TYPE_GROUPCHAT:
# we have a private message, we forward it to a private conversation