core (xmpp): set "to" attribute to <message> element when it's missing:

when missing, profile's full jid is used as "to" attribute. This way, "to" attribute can be retrieved later without having to check if it has been set or not.
This commit is contained in:
Goffi 2018-12-27 11:40:04 +01:00
commit 97d655682c

View file

@ -867,6 +867,10 @@ class SatMessageProtocol(xmppim.MessageProtocol):
.format(xml=message_elt.toXml())))
client = self.parent
if not message_elt.hasAttribute(u'to'):
message_elt['to'] = client.jid.full()
message = {}
subject = {}
extra = {}