From ec390dadf0928df892a8112c7bc09c58399e2402 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sat, 21 Oct 2023 15:17:18 -0600 Subject: [PATCH] Skip updating member events for discord users --- synapse/handlers/profile.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index c2109036ec38..5b512cf20f0b 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -382,6 +382,11 @@ async def _update_join_states( if not self.hs.is_mine(target_user): return + # T2B: don't update membership events for discord users + if target_user.to_string().startswith("@_discord"): + logger.info("skipping profile update for discord user", target_user.to_string()) + return + await self.request_ratelimiter.ratelimit(requester) # Do not actually update the room state for shadow-banned users.