diff --git a/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift b/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift index 4c522577b..090885559 100644 --- a/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift +++ b/Components/SDKMocks/Sources/Generated/SDKGeneratedMocks.swift @@ -18465,16 +18465,27 @@ open class TimelineSDKMock: MatrixRustSDK.Timeline, @unchecked Sendable { get { sendReplyMsgEventIdReceivedInvocationsLock.withLock { sendReplyMsgEventIdUnderlyingReceivedInvocations } } set { sendReplyMsgEventIdReceivedInvocationsLock.withLock { sendReplyMsgEventIdUnderlyingReceivedInvocations = newValue } } } - open var sendReplyMsgEventIdClosure: ((RoomMessageEventContentWithoutRelation, String) async throws -> Void)? - open override func sendReply(msg: RoomMessageEventContentWithoutRelation, eventId: String) async throws { + private let sendReplyMsgEventIdReturnValueLock = NSLock() + open var sendReplyMsgEventIdUnderlyingReturnValue: SendHandle! + open var sendReplyMsgEventIdReturnValue: SendHandle! { + get { sendReplyMsgEventIdReturnValueLock.withLock { sendReplyMsgEventIdUnderlyingReturnValue } } + set { sendReplyMsgEventIdReturnValueLock.withLock { sendReplyMsgEventIdUnderlyingReturnValue = newValue } } + } + open var sendReplyMsgEventIdClosure: ((RoomMessageEventContentWithoutRelation, String) async throws -> SendHandle)? + + open override func sendReply(msg: RoomMessageEventContentWithoutRelation, eventId: String) async throws -> SendHandle { if let error = sendReplyMsgEventIdThrowableError { throw error } sendReplyMsgEventIdCallsCountLock.withLock { sendReplyMsgEventIdUnderlyingCallsCount += 1 } sendReplyMsgEventIdReceivedArguments = (msg: msg, eventId: eventId) sendReplyMsgEventIdReceivedInvocationsLock.withLock { sendReplyMsgEventIdUnderlyingReceivedInvocations.append((msg: msg, eventId: eventId)) } - try await sendReplyMsgEventIdClosure?(msg, eventId) + if let sendReplyMsgEventIdClosure = sendReplyMsgEventIdClosure { + return try await sendReplyMsgEventIdClosure(msg, eventId) + } else { + return sendReplyMsgEventIdReturnValue + } } //MARK: - sendVideo diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 5e7dd533c..7dfcdeb7e 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -10750,7 +10750,7 @@ repositoryURL = "https://github.com/element-hq/matrix-rust-components-swift"; requirement = { kind = exactVersion; - version = 26.08.14; + version = 26.08.17; }; }; 701C7BEF8F70F7A83E852DCC /* XCRemoteSwiftPackageReference "GZIP" */ = { diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5111fec3f..27d205a0d 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -167,8 +167,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/element-hq/matrix-rust-components-swift", "state" : { - "revision" : "de262a6ef0e249cf0c82a44abf958a4c0e9e0518", - "version" : "26.8.14" + "revision" : "f3c898f9673df5405f4e65e35920f10bab32b847", + "version" : "26.8.17" } }, { diff --git a/ElementX/Sources/Services/Timeline/TimelineProxy.swift b/ElementX/Sources/Services/Timeline/TimelineProxy.swift index 8acd269d8..4062affab 100644 --- a/ElementX/Sources/Services/Timeline/TimelineProxy.swift +++ b/ElementX/Sources/Services/Timeline/TimelineProxy.swift @@ -441,7 +441,7 @@ final class TimelineProxy: TimelineProxyProtocol { do { if let inReplyToEventID { - try await timeline.sendReply(msg: messageContent, eventId: inReplyToEventID) + _ = try await timeline.sendReply(msg: messageContent, eventId: inReplyToEventID) MXLog.info("Finished sending reply to eventID: \(inReplyToEventID)") } else { _ = try await timeline.send(msg: messageContent) diff --git a/project.yml b/project.yml index 76fe79810..f7402de7b 100644 --- a/project.yml +++ b/project.yml @@ -74,7 +74,7 @@ packages: # Element/Matrix dependencies MatrixRustSDK: url: https://github.com/element-hq/matrix-rust-components-swift - exactVersion: 26.08.14 + exactVersion: 26.08.17 # path: ../matrix-rust-sdk Compound: path: compound-ios