Commit 8984a362 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

ChatMarkers: Fix parsing errors

parent c0b49558
......@@ -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:
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:
name = type_.getName()
id_ = type_.getAttr('id')
if id_ is None:
log.warning('Chatmarker without id')
properties.marker = ChatMarker(type_, id_)
properties.marker = ChatMarker(name, id_)
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