plugin XEP-0033: the comparison for auto-fixing for the stanza recipient was not correct

This commit is contained in:
souliane 2014-01-05 13:00:17 +01:00
commit 1986ea26ca

View file

@ -86,9 +86,8 @@ class XEP_0033(object):
def discoCallback(entity):
if entity is None:
return Failure(AbortSendMessage(_("XEP-0033 is being used but the server doesn't support it!")))
to = JID(mess_data["to"].host)
if to != entity:
logging.warning(_("Stanzas using XEP-0033 should be addressed to %s, not %s!") % (entity, to))
if mess_data["to"] != entity:
logging.warning(_("Stanzas using XEP-0033 should be addressed to %s, not %s!") % (entity, mess_data["to"]))
logging.warning(_("TODO: addressing has be fixed by the backend... fix it in the frontend!"))
mess_data["to"] = entity
element = mess_data['xml'].addElement('addresses', NS_ADDRESS)