mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
User if rather than for
This commit is contained in:
parent
888c59c955
commit
755adff0e4
1 changed files with 4 additions and 1 deletions
|
@ -150,6 +150,8 @@ class DeviceStore(SQLBaseStore):
|
||||||
)
|
)
|
||||||
|
|
||||||
def mark_remote_user_device_list_as_unsubscribed(self, user_id):
|
def mark_remote_user_device_list_as_unsubscribed(self, user_id):
|
||||||
|
"""Mark that we no longer track device lists for remote user.
|
||||||
|
"""
|
||||||
return self._simple_delete(
|
return self._simple_delete(
|
||||||
table="device_lists_remote_extremeties",
|
table="device_lists_remote_extremeties",
|
||||||
keyvalues={
|
keyvalues={
|
||||||
|
@ -394,7 +396,8 @@ class DeviceStore(SQLBaseStore):
|
||||||
txn, [(user_id, None)], include_all_devices=True
|
txn, [(user_id, None)], include_all_devices=True
|
||||||
)
|
)
|
||||||
|
|
||||||
for user_id, user_devices in devices.iteritems():
|
if devices:
|
||||||
|
user_devices = devices[user_id]
|
||||||
results = []
|
results = []
|
||||||
for device_id, device in user_devices.iteritems():
|
for device_id, device in user_devices.iteritems():
|
||||||
result = {
|
result = {
|
||||||
|
|
Loading…
Reference in a new issue