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:
Stefan Ceriu
2025-06-04 11:51:09 +03:00
committed by Stefan Ceriu
parent ea4f1ba9f3
commit a6c3b5d4af

View File

@@ -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")
continuation.resume()
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.")
}
})
}
}