Merge pull request #991 from vector-im/feature/bma/redactRegardingPowerLevel

Allow user with enough power level to redact other's messages (#969)
This commit is contained in:
Benoit Marty 2023-07-28 16:13:54 +02:00 committed by GitHub
commit 36d2246e2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 113 additions and 18 deletions

View file

@ -250,6 +250,12 @@ class RustMatrixRoom(
}
}
override suspend fun canUserRedact(userId: UserId): Result<Boolean> {
return runCatching {
innerRoom.canUserRedact(userId.value)
}
}
override suspend fun canUserSendState(userId: UserId, type: StateEventType): Result<Boolean> {
return runCatching {
innerRoom.canUserSendState(userId.value, type.map())