comparison sat_frontends/quick_frontend/quick_chat.py @ 2736:df2bc2e704bc

core (xmpp): don't send message without message or subject to bridge (and log a warning in frontends if such a message is received)
author Goffi <goffi@goffi.org>
date Wed, 02 Jan 2019 18:28:30 +0100
parents b4c0a5bec729
children 003b8b4b56a7
comparison
equal deleted inserted replaced
2735:ba74914277cf 2736:df2bc2e704bc
582 type_, 582 type_,
583 extra, 583 extra,
584 profile, 584 profile,
585 ) 585 )
586 return 586 return
587
588 if not msg and not subject and type_ != C.MESS_TYPE_INFO:
589 log.warning(u"Received an empty message for uid {}".format(uid))
590 return
591
587 if self.type == C.CHAT_GROUP: 592 if self.type == C.CHAT_GROUP:
588 if to_jid.resource and type_ != C.MESS_TYPE_GROUPCHAT: 593 if to_jid.resource and type_ != C.MESS_TYPE_GROUPCHAT:
589 # we have a private message, we forward it to a private conversation 594 # we have a private message, we forward it to a private conversation
590 # widget 595 # widget
591 chat_widget = self.getOrCreatePrivateWidget(to_jid) 596 chat_widget = self.getOrCreatePrivateWidget(to_jid)