Function take_timeline_endpoints

Source
pub fn take_timeline_endpoints(
    room_id: &OwnedRoomId,
) -> Option<(Sender<TimelineUpdate>, Receiver<TimelineUpdate>, TimelineRequestSender)>
Expand description

Returns three channel endpoints related to the timeline for the given joined room.

  1. A timeline update sender.
  2. The timeline update receiver, which is a singleton, and can only be taken once.
  3. A tokio::watch sender that can be used to send requests to the timeline subscriber handler.

This will only succeed once per room, as only a single channel receiver can exist.