diff --git a/synapse/storage/databases/main/devices.py b/synapse/storage/databases/main/devices.py index 1e448d2248e5..9b73a238a356 100644 --- a/synapse/storage/databases/main/devices.py +++ b/synapse/storage/databases/main/devices.py @@ -1809,7 +1809,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, Optional[Dict[str, str]]]]: + ) -> List[Tuple[str, str, str, int, Dict[str, str]]]: """Get device list changes by room that have not yet been handled and written to `device_lists_outbound_pokes`. @@ -1827,7 +1827,7 @@ async def get_uncoverted_outbound_room_pokes( def get_uncoverted_outbound_room_pokes_txn( txn: LoggingTransaction, - ) -> List[Tuple[str, str, str, int, Optional[Dict[str, str]]]]: + ) -> List[Tuple[str, str, str, int, Dict[str, str]]]: txn.execute(sql, (limit,)) return [ @@ -1836,7 +1836,7 @@ def get_uncoverted_outbound_room_pokes_txn( device_id, room_id, stream_id, - db_to_json(opentracing_context), + db_to_json(opentracing_context) or {}, ) for user_id, device_id, room_id, stream_id, opentracing_context in txn ] @@ -1852,7 +1852,7 @@ async def add_device_list_outbound_pokes( room_id: str, stream_id: int, hosts: Collection[str], - context: Optional[Dict[str, str]], + context: Dict[str, str], ) -> None: """Queue the device update to be sent to the given set of hosts, calculated from the room ID.