Kick/ban room members (#2501)

* Add a temporary membershipChangePublisher on the timeline.

* Kick/Ban users from a room.

* Unit tests.

* Disable autocorrection on the members list search field.
This commit is contained in:
Doug
2024-02-27 13:02:35 +00:00
committed by GitHub
parent 1afde10ce2
commit fdbaef5aee
30 changed files with 561 additions and 43 deletions
@@ -36,6 +36,7 @@ enum RoomProxyError: Error, Equatable {
case failedMarkingAsRead
case failedSendingTypingNotice
case failedFlaggingAsFavourite
case failedModeration
}
enum RoomProxyAction {
@@ -120,6 +121,12 @@ protocol RoomProxyProtocol {
func flagAsFavourite(_ isFavourite: Bool) async -> Result<Void, RoomProxyError>
// MARK: - Moderation
func kickUser(_ userID: String) async -> Result<Void, RoomProxyError>
func banUser(_ userID: String) async -> Result<Void, RoomProxyError>
func unbanUser(_ userID: String) async -> Result<Void, RoomProxyError>
// MARK: - Element Call
func canUserJoinCall(userID: String) async -> Result<Bool, RoomProxyError>