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

Commits:
3275b1fd by Philipp Hörist at 2017-10-22T22:05:27+02:00
Update .gitignore

- - - - -
3417ccbf by Philipp Hörist at 2017-10-22T22:07:08+02:00
Add getStanzaIDAttrs() method

- - - - -


2 changed files:

- .gitignore
- nbxmpp/protocol.py


Changes:

=====================================
.gitignore
=====================================
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-build/
\ No newline at end of file
+build/
+__pycache__/


=====================================
nbxmpp/protocol.py
=====================================
--- a/nbxmpp/protocol.py
+++ b/nbxmpp/protocol.py
@@ -1043,6 +1043,16 @@ class Message(Protocol):
         """
         return self.getTagAttr('origin-id', namespace=NS_SID, attr='id')
 
+    def getStanzaIDAttrs(self):
+        """
+        Return the stanza-id attributes of the message
+        """
+        try:
+            attrs = self.getTag('stanza-id', namespace=NS_SID).getAttrs()
+        except Exception:
+            return None, None
+        return attrs['id'], attrs['by']
+
     def setBody(self, val):
         """
         Set the text of the message"""



View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/compare/b9fa37be8d6bcb7296926a755deb2cfb62faec89...3417ccbf921c7f5e68ce05e8108f4cf2fcc80860

---
View it on GitLab: 
https://dev.gajim.org/gajim/python-nbxmpp/compare/b9fa37be8d6bcb7296926a755deb2cfb62faec89...3417ccbf921c7f5e68ce05e8108f4cf2fcc80860
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to