# HG changeset patch # User Goffi # Date 1700661187 -3600 # Node ID 9162d3480b9e4cae175938d3f10c78314c429bf6 # Parent 23d21daed21611ac9705b399f4528cb59b395ecb plugin XEP-0280: minor parsing improvement. diff -r 23d21daed216 -r 9162d3480b9e libervia/backend/plugins/plugin_xep_0280.py --- a/libervia/backend/plugins/plugin_xep_0280.py Wed Nov 22 14:52:00 2023 +0100 +++ b/libervia/backend/plugins/plugin_xep_0280.py Wed Nov 22 14:53:07 2023 +0100 @@ -118,13 +118,11 @@ 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