Philipp Hörist pushed to branch master at gajim / python-nbxmpp
Commits:
8984a362 by Philipp Hörist at 2019-10-02T19:27:27Z
ChatMarkers: Fix parsing errors
- - - - -
1 changed file:
- nbxmpp/modules/chat_markers.py
Changes:
=====================================
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_)
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/commit/8984a362f3aebb370403f8df0bcfb7ae4d09556b
--
View it on GitLab:
https://dev.gajim.org/gajim/python-nbxmpp/commit/8984a362f3aebb370403f8df0bcfb7ae4d09556b
You're receiving this email because of your account on dev.gajim.org.
_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits