diff options
author | Mark Haines <mjark@negativecurvature.net> | 2015-09-21 14:38:13 +0100 |
---|---|---|
committer | Mark Haines <mjark@negativecurvature.net> | 2015-09-21 14:38:13 +0100 |
commit | ee2d722f0f4a216815b7bd83f41c4d59b306f45b (patch) | |
tree | 59f5083c2190159f6073dcc8729e916c0d1122dd /synapse/storage/roommember.py | |
parent | Merge pull request #267 from matrix-org/markjh/missing_requirements (diff) | |
parent | Clarify that room_initial_sync returns a python dict (diff) | |
download | synapse-ee2d722f0f4a216815b7bd83f41c4d59b306f45b.tar.xz |
Merge pull request #276 from matrix-org/markjh/history_for_rooms_that_have_been_left
SPEC-216: Allow users to view the history of rooms that they have left.
Diffstat (limited to 'synapse/storage/roommember.py')
-rw-r--r-- | synapse/storage/roommember.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index 8eee2dfbcc..cd9eefbd9f 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -30,7 +30,7 @@ logger = logging.getLogger(__name__) RoomsForUser = namedtuple( "RoomsForUser", - ("room_id", "sender", "membership") + ("room_id", "sender", "membership", "event_id", "stream_ordering") ) @@ -141,9 +141,11 @@ class RoomMemberStore(SQLBaseStore): args.extend(membership_list) sql = ( - "SELECT m.room_id, m.sender, m.membership" + "SELECT m.room_id, m.sender, m.membership, m.event_id, e.stream_ordering" " FROM room_memberships as m" " INNER JOIN current_state_events as c" + " ON e.event_id = c.event_id " + " INNER JOIN events as e " " ON m.event_id = c.event_id " " AND m.room_id = c.room_id " " AND m.user_id = c.state_key" |