Use case #3: Get messages of a room is not working in swift 5
vivekstl opened this issue · 1 comments
vivekstl commented
// Retrieve the room from its room id
let room = mxSession.room(withRoomId: "!room_id:matrix.org")
// Add a listener on events related to this room
_ = room?.liveTimeline.listenToEvents { (event, direction, roomState) in
switch direction {
case .forwards:
// Live/New events come here
break
case .backwards:
// Events that occurred in the past will come here when requesting pagination.
// roomState contains the state of the room just before this event occurred.
break
}
}
Dhruvil-sim commented
Hey @vivekstl have you found something on this?