plugin XEP-0085: disabled a problematic assert (see FIXME)

This commit is contained in:
Goffi 2014-12-10 18:37:14 +01:00
commit b9f967ea5f

View file

@ -163,7 +163,7 @@ class XEP_0085(object):
if self.__isMUC(from_jid, profile):
from_jid = from_jid.userhostJID()
else: # update entity data for one2one chat
assert(from_jid.resource)
# assert from_jid.resource # FIXME: assert doesn't work on normal message from server (e.g. server announce), because there is no resource
try:
domish.generateElementsNamed(message.elements(), name="body").next()
try:
@ -249,7 +249,7 @@ class XEP_0085(object):
# check if notifications should be sent to this contact
if self.__isMUC(to_jid, profile):
return True
assert(to_jid.resource or not self.host.memory.isContactConnected(to_jid, profile))
assert to_jid.resource or not self.host.memory.isContactConnected(to_jid, profile)
try:
return self.host.memory.getEntityDatum(to_jid, ENTITY_KEY, profile)
except (exceptions.UnknownEntityError, KeyError):