plugin XEP-0249: silently discard MUC invitation if user is already in

This commit is contained in:
souliane 2013-11-17 16:23:29 +01:00
commit 13624c417a

View file

@ -137,8 +137,11 @@ class XEP_0249(object):
except:
error(_('Error while parsing invitation'))
return
autojoin = self.host.memory.getParamA(AUTOJOIN_NAME, AUTOJOIN_KEY, profile_key=profile)
from_ = message["from"]
if room in self.host.plugins["XEP-0045"].clients[profile].joined_rooms:
info(_("Invitation silently discarded because user is already in the room."))
return
autojoin = self.host.memory.getParamA(AUTOJOIN_NAME, AUTOJOIN_KEY, profile_key=profile)
def accept_cb(conf_id, accepted, data, profile):
if conf_id == room and accepted: