From 8984a362f3aebb370403f8df0bcfb7ae4d09556b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20H=C3=B6rist?= Date: Wed, 2 Oct 2019 21:27:27 +0200 Subject: ChatMarkers: Fix parsing errors --- nbxmpp/modules/chat_markers.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'nbxmpp/modules') 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_) -- cgit v1.2.3