summary refs log tree commit diff
path: root/synapse/storage/stream.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-19 14:45:21 +0100
committerErik Johnston <erik@matrix.org>2014-09-19 14:45:21 +0100
commit28bcd01e8db14a70e020cd7dd188981f71e70258 (patch)
tree3816c5eb38c4021e092e03f7afcc22f70a79b4b4 /synapse/storage/stream.py
parentSmall formatting fixes (diff)
downloadsynapse-28bcd01e8db14a70e020cd7dd188981f71e70258.tar.xz
SYN-47: Fix bug where we still returned events for rooms we had left.
SYN-47 #resolve
Diffstat (limited to 'synapse/storage/stream.py')
-rw-r--r--synapse/storage/stream.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py
index 8c766b8a00..a76fecf24f 100644
--- a/synapse/storage/stream.py
+++ b/synapse/storage/stream.py
@@ -146,7 +146,7 @@ class StreamStore(SQLBaseStore):
         current_room_membership_sql = (
             "SELECT m.room_id FROM room_memberships as m "
             "INNER JOIN current_state_events as c ON m.event_id = c.event_id "
-            "WHERE m.user_id = ?"
+            "WHERE m.user_id = ? AND m.membership = 'join'"
         )
 
         # We also want to get any membership events about that user, e.g.