From 74d9e1ddc2fe46cdf066da1b15ad3e8db8c0501d Mon Sep 17 00:00:00 2001 From: Alexander PapaTutuWawa Date: Thu, 16 Sep 2021 16:44:47 +0200 Subject: [PATCH] xmpp: Ignore presence from users outside of tracked channels --- xmpp_discord_bridge/main.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xmpp_discord_bridge/main.py b/xmpp_discord_bridge/main.py index 1f702c3..ae2417b 100644 --- a/xmpp_discord_bridge/main.py +++ b/xmpp_discord_bridge/main.py @@ -343,6 +343,10 @@ class BridgeComponent(ComponentXMPP): # Handle a status change for channel in self._guild_map[guild]: muc = self._guild_map[guild][channel] + if after.id not in self._virtual_muc_nicks[muc]: + self._logger.debug("Got presence update from someone outside of the channel. Ignoring...") + return + if after.status == Status.offline: if self._dont_ignore_offline: self.virtual_user_update_presence(muc,