invoke

open suspend operator override fun invoke(conversationId: ConversationId, userId: UserId): PromoteAdminAndLeaveConversationUseCase.Result

Promotes the given userId to admin role in conversationId, then removes the self user from that conversation.

Return

Result.Success if both operations succeed, Result.FailedToPromoteUser if the promotion fails (leave is not attempted), Result.FailedToLeaveConversation if promotion succeeds but leave fails.