Send reaction method placeholder (#355)

* Send reaction method placeholder

* Removed unnecessary emoji skin parsing

* Code review fixes
This commit is contained in:
Aleksandrs Proskurins
2022-12-07 13:19:47 +02:00
committed by GitHub
parent 7db7eec98f
commit 1e197d48de
24 changed files with 88 additions and 80 deletions
@@ -64,6 +64,10 @@ struct MockRoomProxy: RoomProxyProtocol {
func sendMessage(_ message: String, inReplyToEventId: String? = nil) async -> Result<Void, RoomProxyError> {
.failure(.failedSendingMessage)
}
func sendReaction(_ reaction: String, for eventId: String) async -> Result<Void, RoomProxyError> {
.failure(.failedSendingMessage)
}
func editMessage(_ newMessage: String, originalEventId: String) async -> Result<Void, RoomProxyError> {
.failure(.failedSendingMessage)
@@ -185,6 +185,12 @@ class RoomProxy: RoomProxyProtocol {
}
}
}
func sendReaction(_ reaction: String, for eventId: String) async -> Result<Void, RoomProxyError> {
await Task.dispatch(on: .global()) {
.success(())
}
}
func editMessage(_ newMessage: String, originalEventId: String) async -> Result<Void, RoomProxyError> {
sendMessageBgTask = backgroundTaskService.startBackgroundTask(withName: "SendMessage", isReusable: true)
@@ -56,6 +56,8 @@ protocol RoomProxyProtocol {
func paginateBackwards(count: UInt) async -> Result<Void, RoomProxyError>
func sendMessage(_ message: String, inReplyToEventId: String?) async -> Result<Void, RoomProxyError>
func sendReaction(_ reaction: String, for eventId: String) async -> Result<Void, RoomProxyError>
func editMessage(_ newMessage: String, originalEventId: String) async -> Result<Void, RoomProxyError>