core, plugin XEP-0045: fixed message type autodetection + ENTITY_TYPE_MUC constant:
an old hardcoded value was used in several places to detect if an entity is a MUC, but this value was not valid anymore. This has been fixed, and ENTITY_TYPE_MUC constant is now used instead. This fixes message type autodetection for "groupchat" messages. fixes 300
This commit is contained in:
parent
90fcacd4bd
commit
5e43c6c98c
1 changed files with 39 additions and 29 deletions
|
|
@ -257,8 +257,9 @@ class XEP_0085(object):
|
|||
@return: bool
|
||||
"""
|
||||
try:
|
||||
type_ = self.host.memory.getEntityDatum(to_jid.userhostJID(), "type", profile)
|
||||
if type_ == "chatroom": # FIXME: should not use disco instead ?
|
||||
type_ = self.host.memory.getEntityDatum(
|
||||
to_jid.userhostJID(), C.ENTITY_TYPE, profile)
|
||||
if type_ == C.ENTITY_TYPE_MUC:
|
||||
return True
|
||||
except (exceptions.UnknownEntityError, KeyError):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Reference in a new issue