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

Commit 1569b14

Browse files
author
David Robertson
committed
Revert "Correct type of context"
This reverts commit a86da20.
1 parent ac6670c commit 1569b14

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

synapse/storage/databases/main/devices.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ def _add_device_outbound_room_poke_txn(
18151815

18161816
async def get_uncoverted_outbound_room_pokes(
18171817
self, limit: int = 10
1818-
) -> List[Tuple[str, str, str, int, Dict[str, str]]]:
1818+
) -> List[Tuple[str, str, str, int, Optional[Dict[str, str]]]]:
18191819
"""Get device list changes by room that have not yet been handled and
18201820
written to `device_lists_outbound_pokes`.
18211821
@@ -1833,7 +1833,7 @@ async def get_uncoverted_outbound_room_pokes(
18331833

18341834
def get_uncoverted_outbound_room_pokes_txn(
18351835
txn: LoggingTransaction,
1836-
) -> List[Tuple[str, str, str, int, Dict[str, str]]]:
1836+
) -> List[Tuple[str, str, str, int, Optional[Dict[str, str]]]]:
18371837
txn.execute(sql, (limit,))
18381838

18391839
return [
@@ -1842,7 +1842,7 @@ def get_uncoverted_outbound_room_pokes_txn(
18421842
device_id,
18431843
room_id,
18441844
stream_id,
1845-
db_to_json(opentracing_context) or {},
1845+
db_to_json(opentracing_context),
18461846
)
18471847
for user_id, device_id, room_id, stream_id, opentracing_context in txn
18481848
]
@@ -1858,7 +1858,7 @@ async def add_device_list_outbound_pokes(
18581858
room_id: str,
18591859
stream_id: int,
18601860
hosts: Collection[str],
1861-
context: Dict[str, str],
1861+
context: Optional[Dict[str, str]],
18621862
) -> None:
18631863
"""Queue the device update to be sent to the given set of hosts,
18641864
calculated from the room ID.

0 commit comments

Comments
 (0)