mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 11:58:32 +00:00
Switch to using the power levels for retrieving a user's role.
This commit is contained in:
committed by
Stefan Ceriu
parent
de723853e3
commit
8dc389cd54
@@ -26,6 +26,11 @@ struct RoomPowerLevelsProxy: RoomPowerLevelsProxyProtocol {
|
||||
powerLevels.userPowerLevels()
|
||||
}
|
||||
|
||||
func suggestedRole(forUser userID: String) -> RoomMemberRole {
|
||||
let powerLevel = powerLevels.userPowerLevels()[userID] ?? 0
|
||||
return suggestedRoleForPowerLevel(powerLevel: powerLevel)
|
||||
}
|
||||
|
||||
func canOwnUser(sendMessage messageType: MessageLikeEventType) -> Bool {
|
||||
powerLevels.canOwnUserSendMessage(message: messageType)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user