mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Adopt room info power levels (#4245)
* Use the newly RoomInfo published PowerLevels; update permissions at the same time as the room info and avoid unnecessary async calls. * Introduce a RoomInfoProxyProtocol and associated mock and move away from mocked SDK RoomInfos * Bump the SDK to v25.06.23 * Expose new non-throwing methods for checking one's own user permissions * Fix the unit and preview tests (except the TimelineMediaPreviewDetails for which simplified snapshots were generated) * Converge on one single implementation for computing a room's avatar. * Fix more unit tests * Fix the TimelineMediaPreviewDetailsView snapshot tests This reverts commit 9b6c819e611ad2fa3de2c34a4a7aa556fc9faadd. --------- Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
@@ -11,6 +11,17 @@ import MatrixRustSDK
|
||||
protocol RoomPowerLevelsProxyProtocol {
|
||||
var values: RoomPowerLevelsValues { get }
|
||||
|
||||
func canOwnUser(sendMessage messageType: MessageLikeEventType) -> Bool
|
||||
func canOwnUser(sendStateEvent event: StateEventType) -> Bool
|
||||
func canOwnUserInvite() -> Bool
|
||||
func canOwnUserRedactOther() -> Bool
|
||||
func canOwnUserRedactOwn() -> Bool
|
||||
func canOwnUserKick() -> Bool
|
||||
func canOwnUserBan() -> Bool
|
||||
func canOwnUserTriggerRoomNotification() -> Bool
|
||||
func canOwnUserPinOrUnpin() -> Bool
|
||||
func canOwnUserJoinCall() -> Bool
|
||||
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user