Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit a86da20

Browse files
author
David Robertson
committed
Correct type of context
1 parent e458d79 commit a86da20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

synapse/storage/databases/main/devices.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,7 @@ def _add_device_outbound_room_poke_txn(
18091809

18101810
async def get_uncoverted_outbound_room_pokes(
18111811
self, limit: int = 10
1812-
) -> List[Tuple[str, str, str, int, Optional[Dict[str, str]]]]:
1812+
) -> List[Tuple[str, str, str, int, Dict[str, str]]]:
18131813
"""Get device list changes by room that have not yet been handled and
18141814
written to `device_lists_outbound_pokes`.
18151815
@@ -1827,7 +1827,7 @@ async def get_uncoverted_outbound_room_pokes(
18271827

18281828
def get_uncoverted_outbound_room_pokes_txn(
18291829
txn: LoggingTransaction,
1830-
) -> List[Tuple[str, str, str, int, Optional[Dict[str, str]]]]:
1830+
) -> List[Tuple[str, str, str, int, Dict[str, str]]]:
18311831
txn.execute(sql, (limit,))
18321832

18331833
return [
@@ -1836,7 +1836,7 @@ def get_uncoverted_outbound_room_pokes_txn(
18361836
device_id,
18371837
room_id,
18381838
stream_id,
1839-
db_to_json(opentracing_context),
1839+
db_to_json(opentracing_context) or {},
18401840
)
18411841
for user_id, device_id, room_id, stream_id, opentracing_context in txn
18421842
]
@@ -1852,7 +1852,7 @@ async def add_device_list_outbound_pokes(
18521852
room_id: str,
18531853
stream_id: int,
18541854
hosts: Collection[str],
1855-
context: Optional[Dict[str, str]],
1855+
context: Dict[str, str],
18561856
) -> None:
18571857
"""Queue the device update to be sent to the given set of hosts,
18581858
calculated from the room ID.

0 commit comments

Comments
 (0)