[Git][gajim/python-nbxmpp][master] Set from to own jid if attr is not present

Philipp Hörist gitlab at dev.gajim.org
Fri Jan 4 07:32:06 CET 2019


Philipp Hörist pushed to branch master at gajim / python-nbxmpp


Commits:
02eaaa7d by Philipp Hörist at 2019-01-04T06:31:52Z
Set from to own jid if attr is not present

- - - - -


1 changed file:

- nbxmpp/dispatcher_nb.py


Changes:

=====================================
nbxmpp/dispatcher_nb.py
=====================================
@@ -519,6 +519,9 @@ class XMPPDispatcher(PlugIn):
                 log.warning('Message addressed to someone else: %s', stanza)
                 return
 
+            if stanza.getFrom() is None:
+                stanza.setFrom(own_jid.getBare())
+
             # Unwrap carbon
             try:
                 stanza, properties.carbon_type = unwrap_carbon(stanza, own_jid)



View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/02eaaa7da60f13e7949ee22e20f6e374b0d933bb

-- 
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/02eaaa7da60f13e7949ee22e20f6e374b0d933bb
You're receiving this email because of your account on dev.gajim.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gajim.org/pipermail/commits/attachments/20190104/2a5da791/attachment-0001.html>


More information about the Commits mailing list