Toggle reactions from the timeline (#707)

This commit is contained in:
jonnyandrew 2023-06-28 13:02:04 +00:00 committed by GitHub
parent b66801a022
commit 366a800a2c
13 changed files with 84 additions and 33 deletions

View file

@ -63,7 +63,8 @@ class RustMatrixAuthenticationService @Inject constructor(
passphrase = null,
// TODO Oidc
// oidcClientMetadata = oidcClientMetadata,
customSlidingSyncProxy = null
customSlidingSyncProxy = null,
userAgent = null, // TODO
)
private var currentHomeserver = MutableStateFlow<MatrixHomeServerDetails?>(null)

View file

@ -273,9 +273,9 @@ class RustMatrixRoom(
}
}
override suspend fun sendReaction(emoji: String, eventId: EventId): Result<Unit> = withContext(coroutineDispatchers.io) {
override suspend fun toggleReaction(emoji: String, eventId: EventId): Result<Unit> = withContext(coroutineDispatchers.io) {
runCatching {
innerRoom.sendReaction(key = emoji, eventId = eventId.value)
innerRoom.toggleReaction(key = emoji, eventId = eventId.value)
}
}