[Git][gajim/python-nbxmpp][master] Fix parsing payload

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


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


Commits:
3952ae1d by Philipp Hörist at 2019-01-04T06:44:57Z
Fix parsing payload

- - - - -


2 changed files:

- nbxmpp/modules/iq.py
- nbxmpp/structs.py


Changes:

=====================================
nbxmpp/modules/iq.py
=====================================
@@ -48,10 +48,10 @@ class BaseIq:
         properties.jid = stanza.getFrom()
         properties.id = stanza.getID()
 
-        payloads = stanza.getPayload()
-        for payload in payloads:
-            if payload.getName() != 'error':
-                properties.payload = payload
+        childs = stanza.getChildren()
+        for child in childs:
+            if child.getName() != 'error':
+                properties.payload = child
                 break
 
         properties.query = stanza.getQuery()


=====================================
nbxmpp/structs.py
=====================================
@@ -167,6 +167,8 @@ class PresenceProperties:
         self.jid = None
         self.resource = None
         self.id = None
+        self.payload = None
+        self.query = None
         self.nickname = None
         self.self_presence = False
         self.self_bare = False



View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/3952ae1d4c00b79ca6e423d39710c5e94ac76bda

-- 
View it on GitLab: https://dev.gajim.org/gajim/python-nbxmpp/commit/3952ae1d4c00b79ca6e423d39710c5e94ac76bda
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/b6a25cc6/attachment-0001.html>


More information about the Commits mailing list