mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Bump the RustSDK to v1.1.1
This commit is contained in:
committed by
Stefan Ceriu
parent
5eb82d3c88
commit
24aebe4616
@@ -928,10 +928,10 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
}
|
||||
var messageEventContentForReceivedEventID: String?
|
||||
var messageEventContentForReceivedInvocations: [String] = []
|
||||
var messageEventContentForReturnValue: RoomMessageEventContent?
|
||||
var messageEventContentForClosure: ((String) -> RoomMessageEventContent?)?
|
||||
var messageEventContentForReturnValue: RoomMessageEventContentWithoutRelation?
|
||||
var messageEventContentForClosure: ((String) -> RoomMessageEventContentWithoutRelation?)?
|
||||
|
||||
func messageEventContent(for eventID: String) -> RoomMessageEventContent? {
|
||||
func messageEventContent(for eventID: String) -> RoomMessageEventContentWithoutRelation? {
|
||||
messageEventContentForCallsCount += 1
|
||||
messageEventContentForReceivedEventID = eventID
|
||||
messageEventContentForReceivedInvocations.append(eventID)
|
||||
@@ -947,12 +947,12 @@ class RoomProxyMock: RoomProxyProtocol {
|
||||
var sendMessageEventContentCalled: Bool {
|
||||
return sendMessageEventContentCallsCount > 0
|
||||
}
|
||||
var sendMessageEventContentReceivedMessageContent: RoomMessageEventContent?
|
||||
var sendMessageEventContentReceivedInvocations: [RoomMessageEventContent] = []
|
||||
var sendMessageEventContentReceivedMessageContent: RoomMessageEventContentWithoutRelation?
|
||||
var sendMessageEventContentReceivedInvocations: [RoomMessageEventContentWithoutRelation] = []
|
||||
var sendMessageEventContentReturnValue: Result<Void, RoomProxyError>!
|
||||
var sendMessageEventContentClosure: ((RoomMessageEventContent) async -> Result<Void, RoomProxyError>)?
|
||||
var sendMessageEventContentClosure: ((RoomMessageEventContentWithoutRelation) async -> Result<Void, RoomProxyError>)?
|
||||
|
||||
func sendMessageEventContent(_ messageContent: RoomMessageEventContent) async -> Result<Void, RoomProxyError> {
|
||||
func sendMessageEventContent(_ messageContent: RoomMessageEventContentWithoutRelation) async -> Result<Void, RoomProxyError> {
|
||||
sendMessageEventContentCallsCount += 1
|
||||
sendMessageEventContentReceivedMessageContent = messageContent
|
||||
sendMessageEventContentReceivedInvocations.append(messageContent)
|
||||
|
||||
@@ -238,11 +238,11 @@ class RoomProxy: RoomProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func messageEventContent(for eventID: String) -> RoomMessageEventContent? {
|
||||
func messageEventContent(for eventID: String) -> RoomMessageEventContentWithoutRelation? {
|
||||
try? room.getTimelineEventContentByEventId(eventId: eventID)
|
||||
}
|
||||
|
||||
func sendMessageEventContent(_ messageContent: RoomMessageEventContent) async -> Result<Void, RoomProxyError> {
|
||||
func sendMessageEventContent(_ messageContent: RoomMessageEventContentWithoutRelation) async -> Result<Void, RoomProxyError> {
|
||||
sendMessageBackgroundTask = await backgroundTaskService.startBackgroundTask(withName: backgroundTaskName, isReusable: true)
|
||||
defer {
|
||||
sendMessageBackgroundTask?.stop()
|
||||
@@ -263,13 +263,13 @@ class RoomProxy: RoomProxyProtocol {
|
||||
}
|
||||
|
||||
let transactionId = genTransactionId()
|
||||
let messageContent = messageEventContentFromMarkdown(md: message)
|
||||
|
||||
return await Task.dispatch(on: messageSendingDispatchQueue) {
|
||||
do {
|
||||
if let eventID {
|
||||
try self.room.sendReply(msg: message, inReplyToEventId: eventID, txnId: transactionId)
|
||||
try self.room.sendReply(msg: messageContent, inReplyToEventId: eventID, txnId: transactionId)
|
||||
} else {
|
||||
let messageContent = messageEventContentFromMarkdown(md: message)
|
||||
self.room.send(msg: messageContent, txnId: transactionId)
|
||||
}
|
||||
} catch {
|
||||
@@ -447,7 +447,8 @@ class RoomProxy: RoomProxyProtocol {
|
||||
|
||||
return await Task.dispatch(on: messageSendingDispatchQueue) {
|
||||
do {
|
||||
try self.room.edit(newMsg: newMessage, originalEventId: eventID, txnId: transactionId)
|
||||
let newMessageContent = messageEventContentFromMarkdown(md: newMessage)
|
||||
try self.room.edit(newMsg: newMessageContent, originalEventId: eventID, txnId: transactionId)
|
||||
return .success(())
|
||||
} catch {
|
||||
return .failure(.failedEditingMessage)
|
||||
|
||||
@@ -88,9 +88,9 @@ protocol RoomProxyProtocol {
|
||||
|
||||
func sendReadReceipt(for eventID: String) async -> Result<Void, RoomProxyError>
|
||||
|
||||
func messageEventContent(for eventID: String) -> RoomMessageEventContent?
|
||||
func messageEventContent(for eventID: String) -> RoomMessageEventContentWithoutRelation?
|
||||
|
||||
func sendMessageEventContent(_ messageContent: RoomMessageEventContent) async -> Result<Void, RoomProxyError>
|
||||
func sendMessageEventContent(_ messageContent: RoomMessageEventContentWithoutRelation) async -> Result<Void, RoomProxyError>
|
||||
|
||||
func sendMessage(_ message: String, inReplyTo eventID: String?) async -> Result<Void, RoomProxyError>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user