mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Reactions: Use the hack like on riot-android and riot-web if the server has not yet the aggregations API
Fix Steve's comment
This commit is contained in:
@@ -216,6 +216,11 @@ final class ReactionsMenuViewModel: ReactionsMenuViewModelType {
|
||||
///
|
||||
/// - Parameter reaction: the reaction
|
||||
private func reactUsingHack(withReaction reaction: ReactionsMenuReaction) {
|
||||
guard let room = self.session.room(withRoomId: self.roomId) else {
|
||||
print("[ReactionsMenuViewModel] reactUsingHack: Error: Unknown room: \(self.roomId)")
|
||||
return
|
||||
}
|
||||
|
||||
print("[ReactionsMenuViewModel] reactUsingHack")
|
||||
|
||||
let reactionContent = [
|
||||
@@ -226,8 +231,7 @@ final class ReactionsMenuViewModel: ReactionsMenuViewModelType {
|
||||
]
|
||||
|
||||
var nilEvent: MXEvent?
|
||||
let room = self.session.room(withRoomId: self.roomId)
|
||||
room?.sendEvent(.reaction, content: reactionContent, localEcho: &nilEvent, completion: { [weak self] ( completion) in
|
||||
room.sendEvent(.reaction, content: reactionContent, localEcho: &nilEvent, completion: { [weak self] ( completion) in
|
||||
guard let sself = self else {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user