xmpp: Ignore presence from users outside of tracked channels

This commit is contained in:
PapaTutuWawa 2021-09-16 16:44:47 +02:00
parent ebbbf7827a
commit 74d9e1ddc2

View File

@ -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,