# HG changeset patch # User souliane # Date 1384701809 -3600 # Node ID 3344f1d8a232496d26cfa1ffa12c9a674ab16108 # Parent 648511e42a69b80d4995a6c418e06cc407837f7b plugin XEP-0249: silently discard MUC invitation if user is already in diff -r 648511e42a69 -r 3344f1d8a232 src/plugins/plugin_xep_0249.py --- a/src/plugins/plugin_xep_0249.py Sun Nov 17 16:11:55 2013 +0100 +++ b/src/plugins/plugin_xep_0249.py Sun Nov 17 16:23:29 2013 +0100 @@ -137,8 +137,11 @@ except: error(_('Error while parsing invitation')) return + 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) - from_ = message["from"] def accept_cb(conf_id, accepted, data, profile): if conf_id == room and accepted: