Display banned users in room member list (#2415)
* Display banned users in room member list --------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
parent
9669f84766
commit
e68139bf46
34 changed files with 197 additions and 31 deletions
|
|
@ -90,6 +90,7 @@ class FakeMatrixRoom(
|
|||
private var joinRoomResult = Result.success(Unit)
|
||||
private var inviteUserResult = Result.success(Unit)
|
||||
private var canInviteResult = Result.success(true)
|
||||
private var canBanResult = Result.success(false)
|
||||
private var canRedactOwnResult = Result.success(canRedactOwn)
|
||||
private var canRedactOtherResult = Result.success(canRedactOther)
|
||||
private val canSendStateResults = mutableMapOf<StateEventType, Result<Boolean>>()
|
||||
|
|
@ -280,6 +281,10 @@ class FakeMatrixRoom(
|
|||
inviteUserResult
|
||||
}
|
||||
|
||||
override suspend fun canUserBan(userId: UserId): Result<Boolean> {
|
||||
return canBanResult
|
||||
}
|
||||
|
||||
override suspend fun canUserInvite(userId: UserId): Result<Boolean> {
|
||||
return canInviteResult
|
||||
}
|
||||
|
|
@ -495,6 +500,10 @@ class FakeMatrixRoom(
|
|||
joinRoomResult = result
|
||||
}
|
||||
|
||||
fun givenCanBanResult(result: Result<Boolean>) {
|
||||
canBanResult = result
|
||||
}
|
||||
|
||||
fun givenInviteUserResult(result: Result<Unit>) {
|
||||
inviteUserResult = result
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue