summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2017-09-21 16:09:57 +0100
committerErik Johnston <erik@matrix.org>2017-09-21 16:09:57 +0100
commite1dec2f1a797122b4d72ba883e09b2d1b9eafcc9 (patch)
tree2967c896375a528b73c93258e0fe4b7d9a7072f4 /synapse/storage
parentRevert: Keep room_id's in group summary (diff)
downloadsynapse-e1dec2f1a797122b4d72ba883e09b2d1b9eafcc9.tar.xz
Remove user from group summary when the leave the group
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/group_server.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/storage/group_server.py b/synapse/storage/group_server.py
index 2afd689d83..d0b5ad231a 100644
--- a/synapse/storage/group_server.py
+++ b/synapse/storage/group_server.py
@@ -822,6 +822,14 @@ class GroupServerStore(SQLBaseStore):
                     "user_id": user_id,
                 },
             )
+            self._simple_delete_txn(
+                txn,
+                table="group_summary_users",
+                keyvalues={
+                    "group_id": group_id,
+                    "user_id": user_id,
+                },
+            )
         return self.runInteraction("remove_user_from_group", _remove_user_from_group_txn)
 
     def add_room_to_group(self, group_id, room_id, is_public):