diff options
author | Philipp Hörist <philipp@hoerist.com> | 2019-10-02 22:27:27 +0300 |
---|---|---|
committer | Philipp Hörist <philipp@hoerist.com> | 2019-10-02 22:27:27 +0300 |
commit | 8984a362f3aebb370403f8df0bcfb7ae4d09556b (patch) | |
tree | add668f5d5aef4c538a85c046ed113aa9cad60c1 /nbxmpp/modules | |
parent | c0b495584fcd26640e693503a36bba4df19dd361 (diff) |
ChatMarkers: Fix parsing errors
Diffstat (limited to 'nbxmpp/modules')
-rw-r--r-- | nbxmpp/modules/chat_markers.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/nbxmpp/modules/chat_markers.py b/nbxmpp/modules/chat_markers.py index 4f814ae..7d33dd6 100644 --- a/nbxmpp/modules/chat_markers.py +++ b/nbxmpp/modules/chat_markers.py @@ -21,7 +21,7 @@ from nbxmpp.protocol import NS_CHATMARKERS from nbxmpp.structs import StanzaHandler from nbxmpp.structs import ChatMarker -log = logging.getLogger('nbxmpp.m.chat_marker') +log = logging.getLogger('nbxmpp.m.chat_markers') class ChatMarkers: @@ -36,18 +36,19 @@ class ChatMarkers: @staticmethod def _process_message_marker(_con, stanza, properties): - type_ = stanza.getTag('received', NS_CHATMARKERS) - if type_ is not None: - type_ = stanza.getTag('displayed', NS_CHATMARKERS) + type_ = stanza.getTag('received', namespace=NS_CHATMARKERS) + if type_ is None: + type_ = stanza.getTag('displayed', namespace=NS_CHATMARKERS) if type_ is None: - type_ = stanza.getTag('acknowledged', NS_CHATMARKERS) + type_ = stanza.getTag('acknowledged', namespace=NS_CHATMARKERS) if type_ is None: return + name = type_.getName() id_ = type_.getAttr('id') if id_ is None: log.warning('Chatmarker without id') log.warning(stanza) return - properties.marker = ChatMarker(type_, id_) + properties.marker = ChatMarker(name, id_) |