Skip to main content

mark_stale_rooms

Function mark_stale_rooms 

Source
pub(super) fn mark_stale_rooms(
    rooms_states: &mut HashMap<OwnedRoomId, RoomState>,
    user_rooms: &HashMap<OwnedRoomId, RoomInfo>,
    rooms_to_sync: &HashMap<OwnedRoomId, RoomToSync>,
    prev_events_stream_id: StreamId,
) -> Vec<OwnedRoomId>
Expand description

Update and get the list of stale rooms.

A stale room is a room that was previously marked as LIVE, and contains new events in it that will not be returned as part of the current request. These rooms therefore need to be marked as PREVIOUSLY with the up_to set to the last request’s events stream ID (because that is the point up to which those rooms were LIVE).