summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-30 15:09:18 +0100
committerErik Johnston <erik@matrix.org>2016-03-30 15:09:18 +0100
commit73b6bf4629dbfa547a3e5d65395de2ed9c4c08c0 (patch)
tree5bdb99ba2211a8b66539a79a457dd34f60280c97
parentRemove spurious comment (diff)
downloadsynapse-73b6bf4629dbfa547a3e5d65395de2ed9c4c08c0.tar.xz
Only forget room if you were in the room
-rw-r--r--synapse/handlers/room.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py
index 1d4c2c39a1..71f7ab3d22 100644
--- a/synapse/handlers/room.py
+++ b/synapse/handlers/room.py
@@ -946,7 +946,8 @@ class RoomMemberHandler(BaseHandler):
                 user_id, room_id
             ))
 
-        yield self.store.forget(user_id, room_id)
+        if membership:
+            yield self.store.forget(user_id, room_id)
 
 
 class RoomListHandler(BaseHandler):