From ac1bdfba175c490f127d381fd9023919f1920124 Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Mon, 6 Jul 2026 16:39:00 +0300 Subject: [PATCH] Clarify `clear_profile_updates_for_user` docstring --- synapse/storage/databases/main/profile.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/synapse/storage/databases/main/profile.py b/synapse/storage/databases/main/profile.py index 59e00bf36d..8594fdebed 100644 --- a/synapse/storage/databases/main/profile.py +++ b/synapse/storage/databases/main/profile.py @@ -960,7 +960,9 @@ class ProfileWorkerStore(SQLBaseStore): """ Clear all the ProfileUpdateAction rows from the `profile_updates_per_user` table from a particular user for - a list of target users. + a list of target users. This could be needed for example to ensure when + a user leaves the last shared room with another user, that we clear all + the old updates to ensure we don't leak any field updates to the other user. This does not remove the stream ID row from `profile_updates` as it is likely other per user rows may refer to it. Our automatic pruning of old