matrix-org/matrix-ios-sdk

[Help] MXRoom.liveTimeline has no member listenToEvents

pascbeck opened this issue · 0 comments

       guard self.dataSource == nil, let mainSession = self.mxSessions.first as? MXSession else {
            return
        }
        
        // Retrieve the room from its room id
        let room = mainSession.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
            }
        }

room?.liveTimeline.listenToEvents throws Value of type '((((any MXEventTimeline)?) -> Void)?) -> Void' has no member 'listenToEvents'

Can somebody help me please?