plugin XEP-0277: when publisher is not found, check ancestor in both client and component namespaces
This commit is contained in:
parent
108c41bf73
commit
b6b2189433
2 changed files with 3 additions and 1 deletions
|
|
@ -158,6 +158,8 @@ class Const(object):
|
|||
## 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"
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ class XEP_0277(object):
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue