mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Element Call permission tweaks (#2187)
* vector-im/element-meta/issues/2230 - Specify `call.member` default power levels when creating a room * vector-im/element-meta/issues/2229 - Take into account permissions when configuring the room screen call button
This commit is contained in:
@@ -396,6 +396,15 @@ class RoomProxy: RoomProxyProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
func canUserJoinCall(userID: String) async -> Result<Bool, RoomProxyError> {
|
||||
do {
|
||||
return try await .success(room.canUserSendState(userId: userID, stateEvent: .callMember))
|
||||
} catch {
|
||||
MXLog.error("Failed checking if the user can trigger room notification with error: \(error)")
|
||||
return .failure(.failedCheckingPermission)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Element Call
|
||||
|
||||
func elementCallWidgetDriver() -> ElementCallWidgetDriverProtocol {
|
||||
|
||||
@@ -114,6 +114,8 @@ protocol RoomProxyProtocol {
|
||||
|
||||
func canUserTriggerRoomNotification(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
|
||||
func canUserJoinCall(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
|
||||
// MARK: - Element Call
|
||||
|
||||
func elementCallWidgetDriver() -> ElementCallWidgetDriverProtocol
|
||||
|
||||
Reference in New Issue
Block a user