Set a default power level to join calls in room (#1927)
* Set a default power level to join calls. Also, create new rooms taking this power level into account. * Modify test to make sure we display the disabled state even when there is an ongoing call --------- Co-authored-by: ElementBot <benoitm+elementbot@element.io>
This commit is contained in:
parent
7582d2f12e
commit
2e8d5ac86a
12 changed files with 98 additions and 21 deletions
|
|
@ -111,6 +111,7 @@ class FakeMatrixRoom(
|
|||
private var generateWidgetWebViewUrlResult = Result.success("https://call.element.io")
|
||||
private var getWidgetDriverResult: Result<MatrixWidgetDriver> = Result.success(FakeWidgetDriver())
|
||||
private var canUserTriggerRoomNotificationResult: Result<Boolean> = Result.success(true)
|
||||
private var canUserJoinCallResult: Result<Boolean> = Result.success(true)
|
||||
var sendMessageMentions = emptyList<Mention>()
|
||||
val editMessageCalls = mutableListOf<Pair<String, String?>>()
|
||||
|
||||
|
|
@ -292,6 +293,10 @@ class FakeMatrixRoom(
|
|||
return canUserTriggerRoomNotificationResult
|
||||
}
|
||||
|
||||
override suspend fun canUserJoinCall(userId: UserId): Result<Boolean> {
|
||||
return canUserJoinCallResult
|
||||
}
|
||||
|
||||
override suspend fun sendImage(
|
||||
file: File,
|
||||
thumbnailFile: File,
|
||||
|
|
@ -474,6 +479,10 @@ class FakeMatrixRoom(
|
|||
canUserTriggerRoomNotificationResult = result
|
||||
}
|
||||
|
||||
fun givenCanUserJoinCall(result: Result<Boolean>) {
|
||||
canUserJoinCallResult = result
|
||||
}
|
||||
|
||||
fun givenIgnoreResult(result: Result<Unit>) {
|
||||
ignoreResult = result
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue