From b2246de4e3752021071cb6bef66b80822f8f8dfd Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Fri, 26 Jun 2026 16:57:33 +0300 Subject: [PATCH] Ensure we don't call `_dispatch_record_profile_updates` with an empty list of fields --- synapse/handlers/profile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index 8bc724ad35..70ae1bcca8 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -556,9 +556,10 @@ class ProfileHandler: await self.store.delete_profile(target_user) # Record profile updates for the profile update stream - await self._dispatch_record_profile_updates( - target_user, {field_name for field_name, _value in profile_updates} - ) + if len(profile_updates): + await self._dispatch_record_profile_updates( + target_user, {field_name for field_name, _value in profile_updates} + ) await self._third_party_rules.on_profile_update( target_user.to_string(),