plugin XEP-0280: minor parsing improvement.
This commit is contained in:
parent
5bb47c69e4
commit
2e638b26fc
1 changed files with 2 additions and 4 deletions
|
|
@ -118,13 +118,11 @@ class XEP_0280(object):
|
|||
|
||||
def message_received_trigger(self, client, message_elt, post_treat):
|
||||
"""get message and handle it if carbons namespace is present"""
|
||||
carbons_elt = None
|
||||
for e in message_elt.elements():
|
||||
if e.uri == NS_CARBONS:
|
||||
if e.uri == NS_CARBONS and e.name in ("received", "sent"):
|
||||
carbons_elt = e
|
||||
break
|
||||
|
||||
if carbons_elt is None:
|
||||
else:
|
||||
# this is not a message carbons,
|
||||
# we continue normal behaviour
|
||||
return True
|
||||
|
|
|
|||
Loading…
Reference in a new issue