mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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
@@ -152,20 +152,11 @@ protocol JoinedRoomProxyProtocol: RoomProxyProtocol {
|
||||
|
||||
// MARK: - Power Levels
|
||||
|
||||
func powerLevels() async -> Result<RoomPowerLevels, RoomProxyError>
|
||||
func powerLevels() async -> Result<RoomPowerLevelsProxyProtocol, RoomProxyError>
|
||||
func applyPowerLevelChanges(_ changes: RoomPowerLevelChanges) async -> Result<Void, RoomProxyError>
|
||||
func resetPowerLevels() async -> Result<RoomPowerLevels, RoomProxyError>
|
||||
func resetPowerLevels() async -> Result<Void, RoomProxyError>
|
||||
func suggestedRole(for userID: String) async -> Result<RoomMemberRole, RoomProxyError>
|
||||
func updatePowerLevelsForUsers(_ updates: [(userID: String, powerLevel: Int64)]) async -> Result<Void, RoomProxyError>
|
||||
func canUser(userID: String, sendMessage messageType: MessageLikeEventType) async -> Result<Bool, RoomProxyError>
|
||||
func canUser(userID: String, sendStateEvent event: StateEventType) async -> Result<Bool, RoomProxyError>
|
||||
func canUserInvite(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
func canUserRedactOther(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
func canUserRedactOwn(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
func canUserKick(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
func canUserBan(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
func canUserTriggerRoomNotification(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
func canUserPinOrUnpin(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
|
||||
// MARK: - Moderation
|
||||
|
||||
@@ -175,9 +166,7 @@ protocol JoinedRoomProxyProtocol: RoomProxyProtocol {
|
||||
|
||||
// MARK: - Element Call
|
||||
|
||||
func canUserJoinCall(userID: String) async -> Result<Bool, RoomProxyError>
|
||||
func elementCallWidgetDriver(deviceID: String) -> ElementCallWidgetDriverProtocol
|
||||
|
||||
func sendCallNotificationIfNeeded() async -> Result<Void, RoomProxyError>
|
||||
|
||||
// MARK: - Permalinks
|
||||
|
||||
Reference in New Issue
Block a user