Allow multiple room info updates when receiving a call before deciding the room doesn't have an active call anymore.
This commit is contained in:
committed by
Stefan Ceriu
parent
ea4f1ba9f3
commit
a6c3b5d4af
@@ -176,9 +176,13 @@ class NotificationHandler {
|
||||
if !room.hasActiveRoomCall() { // If I don't have an active call wait a bit and make sure
|
||||
let expiringTask = ExpiringTaskRunner {
|
||||
await withCheckedContinuation { [weak self] continuation in
|
||||
self?.roomInfoObservationToken = room.subscribeToRoomInfoUpdates(listener: SDKListener { _ in
|
||||
MXLog.info("Received room info update")
|
||||
self?.roomInfoObservationToken = room.subscribeToRoomInfoUpdates(listener: SDKListener { info in
|
||||
if info.hasRoomCall {
|
||||
MXLog.info("Received room info update and the room has an active call now.")
|
||||
continuation.resume()
|
||||
} else {
|
||||
MXLog.info("Received a room info update but the room still doesn't have an ongoing call.")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user