diff options
author | Erik Johnston <erik@matrix.org> | 2016-01-27 17:11:04 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-01-27 17:33:27 +0000 |
commit | e7febf4fbb1f1beb11e7a03252f6844f84af7f30 (patch) | |
tree | 9bbfdf70eda21d291b02b1cec3263be61ea8c7aa /synapse/storage/stream.py | |
parent | Use the same path for incremental with gap or without gap (diff) | |
download | synapse-e7febf4fbb1f1beb11e7a03252f6844f84af7f30.tar.xz |
PEP8
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/stream.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/synapse/storage/stream.py b/synapse/storage/stream.py index 563e289c4e..0b22251790 100644 --- a/synapse/storage/stream.py +++ b/synapse/storage/stream.py @@ -262,7 +262,8 @@ class StreamStore(SQLBaseStore): def f(txn): if from_id is not None: sql = ( - "SELECT m.event_id, stream_ordering FROM events AS e, room_memberships AS m" + "SELECT m.event_id, stream_ordering FROM events AS e," + " room_memberships AS m" " WHERE e.event_id = m.event_id" " AND m.user_id = ?" " AND e.stream_ordering > ? AND e.stream_ordering <= ?" @@ -271,7 +272,8 @@ class StreamStore(SQLBaseStore): txn.execute(sql, (user_id, from_id, to_id,)) else: sql = ( - "SELECT m.event_id, stream_ordering FROM events AS e, room_memberships AS m" + "SELECT m.event_id, stream_ordering FROM events AS e," + " room_memberships AS m" " WHERE e.event_id = m.event_id" " AND m.user_id = ?" " AND stream_ordering <= ?" @@ -307,7 +309,8 @@ class StreamStore(SQLBaseStore): "SELECT c.room_id FROM history_visibility AS h" " INNER JOIN current_state_events AS c" " ON h.event_id = c.event_id" - " WHERE c.room_id IN (%s) AND h.history_visibility = 'world_readable'" % ( + " WHERE c.room_id IN (%s)" + " AND h.history_visibility = 'world_readable'" % ( ",".join(map(lambda _: "?", room_ids)) ) ) |