# HG changeset patch # User Goffi # Date 1545907204 -3600 # Node ID a58e380c1c3703e917b725e8324ea429fa6f948a # Parent b4c0a5bec729c862da90cf84b68678c8d5752315 core (xmpp): set "to" attribute to 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. diff -r b4c0a5bec729 -r a58e380c1c37 sat/core/xmpp.py --- a/sat/core/xmpp.py Thu Dec 27 11:40:04 2018 +0100 +++ b/sat/core/xmpp.py Thu Dec 27 11:40:04 2018 +0100 @@ -867,6 +867,10 @@ .format(xml=message_elt.toXml()))) client = self.parent + + if not message_elt.hasAttribute(u'to'): + message_elt['to'] = client.jid.full() + message = {} subject = {} extra = {}