misc(power level) : remove old api
This commit is contained in:
parent
d654280e30
commit
541a1d29bd
2 changed files with 0 additions and 133 deletions
|
|
@ -186,60 +186,6 @@ class RustBaseRoom(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserInvite(userId: UserId): Result<Boolean> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.getPowerLevels().use { it.canUserInvite(userId.value) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserKick(userId: UserId): Result<Boolean> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.getPowerLevels().use { it.canUserKick(userId.value) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserBan(userId: UserId): Result<Boolean> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.getPowerLevels().use { it.canUserBan(userId.value) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserRedactOwn(userId: UserId): Result<Boolean> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.getPowerLevels().use { it.canUserRedactOwn(userId.value) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserRedactOther(userId: UserId): Result<Boolean> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.getPowerLevels().use { it.canUserRedactOther(userId.value) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserSendState(userId: UserId, type: StateEventType): Result<Boolean> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.getPowerLevels().use { it.canUserSendState(userId.value, type.map()) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserSendMessage(userId: UserId, type: MessageEventType): Result<Boolean> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.getPowerLevels().use { it.canUserSendMessage(userId.value, type.map()) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserTriggerRoomNotification(userId: UserId): Result<Boolean> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.getPowerLevels().use { it.canUserTriggerRoomNotification(userId.value) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun canUserPinUnpin(userId: UserId): Result<Boolean> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.getPowerLevels().use { it.canUserPinUnpin(userId.value) }
|
||||
}
|
||||
}
|
||||
|
||||
override suspend fun clearEventCacheStorage(): Result<Unit> = withContext(roomDispatcher) {
|
||||
runCatchingExceptions {
|
||||
innerRoom.clearEventCacheStorage()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue