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

Commit

Permalink
Revert "Correct type of context"
Browse files Browse the repository at this point in the history
This reverts commit a86da20.
  • Loading branch information
David Robertson committed Jun 14, 2022
1 parent ac6670c commit 1569b14
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions synapse/storage/databases/main/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,7 @@ def _add_device_outbound_room_poke_txn(

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

def get_uncoverted_outbound_room_pokes_txn(
txn: LoggingTransaction,
) -> List[Tuple[str, str, str, int, Dict[str, str]]]:
) -> List[Tuple[str, str, str, int, Optional[Dict[str, str]]]]:
txn.execute(sql, (limit,))

return [
Expand All @@ -1842,7 +1842,7 @@ def get_uncoverted_outbound_room_pokes_txn(
device_id,
room_id,
stream_id,
db_to_json(opentracing_context) or {},
db_to_json(opentracing_context),
)
for user_id, device_id, room_id, stream_id, opentracing_context in txn
]
Expand All @@ -1858,7 +1858,7 @@ async def add_device_list_outbound_pokes(
room_id: str,
stream_id: int,
hosts: Collection[str],
context: Dict[str, str],
context: Optional[Dict[str, str]],
) -> None:
"""Queue the device update to be sent to the given set of hosts,
calculated from the room ID.
Expand Down

0 comments on commit 1569b14

Please sign in to comment.