Mercurial > libervia-backend
diff src/core/xmpp.py @ 1276:56adf73bedeb
core (xmpp): set missing "from" attribute of received messages to the server domain
author | souliane <souliane@mailoo.org> |
---|---|
date | Fri, 19 Dec 2014 11:42:45 +0100 |
parents | 8b891f9be183 |
children | f71a0fc26886 |
line wrap: on
line diff
--- a/src/core/xmpp.py Fri Dec 19 11:41:23 2014 +0100 +++ b/src/core/xmpp.py Fri Dec 19 11:42:45 2014 +0100 @@ -114,6 +114,8 @@ self.host = host def onMessage(self, message): + if not message.hasAttribute('from'): + message['from'] = self.parent.jid.host log.debug(_(u"got message from: %s") % message["from"]) post_treat = defer.Deferred() # XXX: plugin can add their treatments to this deferred