Fixes #4534 - Use content_loaded instead of io.element.join for detecting EC timeouts. Bump EC to 0.16.0-rc.4.

This commit is contained in:
Stefan Ceriu
2025-09-23 18:07:04 +03:00
committed by Stefan Ceriu
parent 29bddee91a
commit 3f0df6eccf
5 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -9363,7 +9363,7 @@
repositoryURL = "https://github.com/element-hq/element-call-swift"; repositoryURL = "https://github.com/element-hq/element-call-swift";
requirement = { requirement = {
kind = exactVersion; kind = exactVersion;
version = "0.16.0-rc.3"; version = "0.16.0-rc.4";
}; };
}; };
821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = { 821C67C9A7F8CC3FD41B28B4 /* XCRemoteSwiftPackageReference "emojibase-bindings" */ = {
@@ -59,8 +59,8 @@
"kind" : "remoteSourceControl", "kind" : "remoteSourceControl",
"location" : "https://github.com/element-hq/element-call-swift", "location" : "https://github.com/element-hq/element-call-swift",
"state" : { "state" : {
"revision" : "48523e02e3ea1e9d1b8c1ca8652c37ff64299187", "revision" : "3e2571a11f611761114038225ef368dd9ac83805",
"version" : "0.16.0-rc.3" "version" : "0.16.0-rc.4"
} }
}, },
{ {
@@ -106,7 +106,7 @@ enum CallScreenJavaScriptMessageName: String, CaseIterable {
struct DecodedWidgetMessage: Decodable { struct DecodedWidgetMessage: Decodable {
private static let decoder = JSONDecoder() private static let decoder = JSONDecoder()
private static let joinAction = "io.element.join" private static let contentLoadedAction = "content_loaded"
private static let fromWidget = "fromWidget" private static let fromWidget = "fromWidget"
let action: String? let action: String?
@@ -119,7 +119,7 @@ struct DecodedWidgetMessage: Decodable {
return try decoder.decode(DecodedWidgetMessage.self, from: data) return try decoder.decode(DecodedWidgetMessage.self, from: data)
} }
var hasJoined: Bool { var hasLoaded: Bool {
action == Self.joinAction && api == Self.fromWidget action == Self.contentLoadedAction && api == Self.fromWidget
} }
} }
@@ -153,7 +153,7 @@ class CallScreenViewModel: CallScreenViewModelType, CallScreenViewModelProtocol
private func handleWidgetAction(message: String) async { private func handleWidgetAction(message: String) async {
if timeoutTask != nil, if timeoutTask != nil,
let decodedMessage = try? DecodedWidgetMessage.decode(message: message), let decodedMessage = try? DecodedWidgetMessage.decode(message: message),
decodedMessage.hasJoined { decodedMessage.hasLoaded {
// This means that the call room was joined succesfully, we can stop the timeout task // This means that the call room was joined succesfully, we can stop the timeout task
timeoutTask = nil timeoutTask = nil
} }
+1 -1
View File
@@ -80,7 +80,7 @@ packages:
# path: ../matrix-analytics-events # path: ../matrix-analytics-events
EmbeddedElementCall: EmbeddedElementCall:
url: https://github.com/element-hq/element-call-swift url: https://github.com/element-hq/element-call-swift
exactVersion: 0.16.0-rc.3 exactVersion: 0.16.0-rc.4
Emojibase: Emojibase:
url: https://github.com/matrix-org/emojibase-bindings url: https://github.com/matrix-org/emojibase-bindings
minorVersion: 1.4.2 minorVersion: 1.4.2