mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-19 09:31:35 +03:00
thinko
This commit is contained in:
parent
671ff2cef6
commit
6020c112d5
1 changed files with 3 additions and 2 deletions
|
@ -98,7 +98,8 @@ class RoomMemberWorkerStore(EventsWorkerStore):
|
|||
res = {}
|
||||
for r in txn:
|
||||
summary = res.setdefault(to_ascii(r[1]), {})
|
||||
summary['users'].append((to_ascii(r[0]), to_ascii(r[2])))
|
||||
users = summary.setdefault('users', [])
|
||||
users.append((to_ascii(r[0]), to_ascii(r[2])))
|
||||
|
||||
sql = (
|
||||
"SELECT count(*), m.membership FROM room_memberships as m"
|
||||
|
@ -112,7 +113,7 @@ class RoomMemberWorkerStore(EventsWorkerStore):
|
|||
txn.execute(sql, (room_id,))
|
||||
for r in txn:
|
||||
summary = res.setdefault(to_ascii(r[1]), {})
|
||||
summary['count'] = r[0]
|
||||
summary.set('count', r[0])
|
||||
|
||||
return res
|
||||
|
||||
|
|
Loading…
Reference in a new issue