mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 00:49:44 +00:00
Adopt the lastest SDK APIs and refactor how we deal with user permissions.
This patch introduces a new RoomPowerLevelsProxy and its associated mock and adopts newer Rust APIs to make working with user power levels and permissions easier.
This commit is contained in:
committed by
Stefan Ceriu
parent
96e5ed06f5
commit
f522e15dac
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// Copyright 2025 New Vector Ltd.
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
||||
// Please see LICENSE files in the repository root for full details.
|
||||
//
|
||||
|
||||
import MatrixRustSDK
|
||||
|
||||
// sourcery: AutoMockable
|
||||
protocol RoomPowerLevelsProxyProtocol {
|
||||
var values: RoomPowerLevelsValues { get }
|
||||
|
||||
func canUser(userID: String, sendMessage messageType: MessageLikeEventType) -> Result<Bool, RoomProxyError>
|
||||
func canUser(userID: String, sendStateEvent event: StateEventType) -> Result<Bool, RoomProxyError>
|
||||
func canUserInvite(userID: String) -> Result<Bool, RoomProxyError>
|
||||
func canUserRedactOther(userID: String) -> Result<Bool, RoomProxyError>
|
||||
func canUserRedactOwn(userID: String) -> Result<Bool, RoomProxyError>
|
||||
func canUserKick(userID: String) -> Result<Bool, RoomProxyError>
|
||||
func canUserBan(userID: String) -> Result<Bool, RoomProxyError>
|
||||
func canUserTriggerRoomNotification(userID: String) -> Result<Bool, RoomProxyError>
|
||||
func canUserPinOrUnpin(userID: String) -> Result<Bool, RoomProxyError>
|
||||
func canUserJoinCall(userID: String) -> Result<Bool, RoomProxyError>
|
||||
}
|
||||
Reference in New Issue
Block a user