diff --git a/libervia/backend/plugins/plugin_xep_0280.py b/libervia/backend/plugins/plugin_xep_0280.py index 7495947a..775a63f1 100644 --- a/libervia/backend/plugins/plugin_xep_0280.py +++ b/libervia/backend/plugins/plugin_xep_0280.py @@ -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