Restore permissions to creator and display them as owners in the list (#4369)

* restore permissions to creator and display them as owners in the list

* improved the code to use actually 5 roles in the app to distinguish a real creator from an owner
This commit is contained in:
Mauro
2025-07-31 16:52:55 +02:00
committed by GitHub
parent 496c29ae36
commit 731d60b6e9
29 changed files with 205 additions and 137 deletions
@@ -212,7 +212,7 @@ class RoomMembersListScreenViewModelTests: XCTestCase {
// When tapping on another administrator in the list.
deferred = deferFulfillment(context.$viewState) { $0.bindings.manageMemeberViewModel != nil }
guard let admin = viewModel.state.visibleJoinedMembers.first(where: { $0.member.role == .administrator && $0.member.id != RoomMemberProxyMock.mockMe.userID })?.member else {
guard let admin = viewModel.state.visibleJoinedMembers.first(where: { $0.member.role.isAdminOrHigher && $0.member.id != RoomMemberProxyMock.mockMe.userID })?.member else {
XCTFail("Expected to find another admin.")
return
}