# HG changeset patch # User Goffi # Date 1678981427 -3600 # Node ID 74d4c9ff893d3affced494855c9dca329320d134 # Parent 818db4ca3717f7f2b638c117c8e4a126ff033167 plugin XEP-0277: when publisher is not found, check ancestor in both client and component namespaces diff -r 818db4ca3717 -r 74d4c9ff893d sat/core/constants.py --- a/sat/core/constants.py Thu Mar 16 16:43:08 2023 +0100 +++ b/sat/core/constants.py Thu Mar 16 16:43:47 2023 +0100 @@ -158,6 +158,8 @@ ## Common namespaces ## NS_XML = "http://www.w3.org/XML/1998/namespace" NS_CLIENT = "jabber:client" + NS_COMPONENT = "jabber:component:accept" + NS_STREAM = (NS_CLIENT, NS_COMPONENT) NS_FORWARD = "urn:xmpp:forward:0" NS_DELAY = "urn:xmpp:delay" NS_XHTML = "http://www.w3.org/1999/xhtml" diff -r 818db4ca3717 -r 74d4c9ff893d sat/plugins/plugin_xep_0277.py --- a/sat/plugins/plugin_xep_0277.py Thu Mar 16 16:43:08 2023 +0100 +++ b/sat/plugins/plugin_xep_0277.py Thu Mar 16 16:43:47 2023 +0100 @@ -575,7 +575,7 @@ microblog_data["author_jid"] = publisher microblog_data["author_jid_verified"] = True else: - iq_elt = xml_tools.findAncestor(item_elt, "iq", C.NS_CLIENT) + iq_elt = xml_tools.findAncestor(item_elt, "iq", C.NS_STREAM) microblog_data["author_jid"] = iq_elt["from"] microblog_data["author_jid_verified"] = False