fix typos

This commit is contained in:
Matthew Hodgson 2018-09-07 16:33:00 +01:00
parent 0bbcd070d2
commit c630121b01
2 changed files with 3 additions and 3 deletions

View file

@ -1608,7 +1608,7 @@ class SyncHandler(object):
sync_config.filter_collection.lazy_load_members() and
(
any(ev.type == EventTypes.Member for ev in batch.events) or
(batch.limited and any(ev.type == EventTypes.Member for ev in state)) or
#(batch.limited and any(ev.type == EventTypes.Member for ev in state)) or
since_token is None
)
):

View file

@ -97,7 +97,7 @@ class RoomMemberWorkerStore(EventsWorkerStore):
txn.execute(sql, (room_id, 5))
res = {}
for r in txn:
summary = res.setdefault(to_ascii[r[1]], {})
summary = res.setdefault(to_ascii(r[1]), {})
summary['users'].append((to_ascii(r[0]), to_ascii(r[2])))
sql = (
@ -109,7 +109,7 @@ class RoomMemberWorkerStore(EventsWorkerStore):
" WHERE c.type = 'm.room.member' AND c.room_id = ? group by m.membership"
)
txn.execute(sql, (room_id, 5))
txn.execute(sql, (room_id,))
for r in txn:
summary['count'] = r[0]