plugin XEP-0054: return always False in isRoom is plugin XEP-0045 is not available + raise NotFound if avatar is requested for a MUC room (not the occupants, the room itself)
This commit is contained in:
parent
9e243b3a8a
commit
284b2e2ca7
1 changed files with 8 additions and 1 deletions
|
|
@ -98,7 +98,12 @@ class XEP_0054(object):
|
|||
@return (bool): True if the bare jid of the entity is a room jid
|
||||
"""
|
||||
try:
|
||||
self.host.plugins['XEP-0045'].checkRoomJoined(client, entity_jid.userhostJID())
|
||||
muc_plg = self.host.plugins['XEP-0045']
|
||||
except KeyError:
|
||||
return False
|
||||
|
||||
try:
|
||||
muc_plg.checkRoomJoined(client, entity_jid.userhostJID())
|
||||
except exceptions.NotFound:
|
||||
return False
|
||||
else:
|
||||
|
|
@ -356,6 +361,8 @@ class XEP_0054(object):
|
|||
@param hash_only(bool): if True only return hash, not full path
|
||||
@raise exceptions.NotFound: no avatar found
|
||||
"""
|
||||
if not entity.resource and self.isRoom(client, entity):
|
||||
raise exceptions.NotFound
|
||||
entity = self.getBareOrFull(client, entity)
|
||||
full_path = None
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue