Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Update .gitignore
· 3275b1fd
Philipp Hörist
authored
Oct 22, 2017
3275b1fd
Add getStanzaIDAttrs() method
· 3417ccbf
Philipp Hörist
authored
Oct 22, 2017
3417ccbf
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
3417ccbf
build/
\ No newline at end of file
build/
__pycache__/
nbxmpp/protocol.py
View file @
3417ccbf
...
...
@@ -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
"""
...
...