This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 1 file changed +17
-8
lines changed
1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change @@ -1850,6 +1850,7 @@ async def _get_rooms_changed(
1850
1850
full_state = False ,
1851
1851
since_token = since_token ,
1852
1852
upto_token = leave_token ,
1853
+ out_of_band = leave_event .internal_metadata .is_out_of_band_membership (),
1853
1854
)
1854
1855
)
1855
1856
@@ -2116,14 +2117,18 @@ async def _generate_room_entry(
2116
2117
):
2117
2118
return
2118
2119
2119
- state = await self .compute_state_delta (
2120
- room_id ,
2121
- batch ,
2122
- sync_config ,
2123
- since_token ,
2124
- now_token ,
2125
- full_state = full_state ,
2126
- )
2120
+ if not room_builder .out_of_band :
2121
+ state = await self .compute_state_delta (
2122
+ room_id ,
2123
+ batch ,
2124
+ sync_config ,
2125
+ since_token ,
2126
+ now_token ,
2127
+ full_state = full_state ,
2128
+ )
2129
+ else :
2130
+ # An out of band room won't have any state changes.
2131
+ state = {}
2127
2132
2128
2133
summary : Optional [JsonDict ] = {}
2129
2134
@@ -2386,6 +2391,8 @@ class RoomSyncResultBuilder:
2386
2391
full_state: Whether the full state should be sent in result
2387
2392
since_token: Earliest point to return events from, or None
2388
2393
upto_token: Latest point to return events from.
2394
+ out_of_band: whether the events in the room are "out of band" events
2395
+ and the server isn't in the room.
2389
2396
"""
2390
2397
2391
2398
room_id : str
@@ -2395,3 +2402,5 @@ class RoomSyncResultBuilder:
2395
2402
full_state : bool
2396
2403
since_token : Optional [StreamToken ]
2397
2404
upto_token : StreamToken
2405
+
2406
+ out_of_band : bool = False
You can’t perform that action at this time.
0 commit comments