memory, plugin XEP-0045: getMainResource returns None when asking a MUC entity + fixes /whois on a MUC (bare) entity
This commit is contained in:
parent
9071298061
commit
3bff0d0237
1 changed files with 17 additions and 0 deletions
|
|
@ -514,6 +514,11 @@ class Memory(object):
|
|||
"""
|
||||
if entity_jid.resource:
|
||||
raise ValueError("getMainResource must be used with a bare jid (got {})".format(entity_jid))
|
||||
try:
|
||||
if self.host.plugins["XEP-0045"].isRoom(entity_jid, profile_key):
|
||||
return None # MUC rooms have no main resource
|
||||
except KeyError: # plugin not found
|
||||
pass
|
||||
resources = self.getAllResources(entity_jid, profile_key)
|
||||
priority_resources = []
|
||||
for resource in resources:
|
||||
|
|
|
|||
Loading…
Reference in a new issue