mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Bump the RustSDK to v1.1.1
This commit is contained in:
committed by
Stefan Ceriu
parent
5eb82d3c88
commit
24aebe4616
@@ -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