Commit 3417ccbf authored by Philipp Hörist's avatar Philipp Hörist

Add getStanzaIDAttrs() method

parent 3275b1fd
Pipeline #402 passed with stages
in 14 seconds
......@@ -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"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment