public fun leaveGroup(channel: Channel) { dismissChannelAction()  chatClient.getCurrentUser()?.let { user -> chatClient.channel(channel.type, channel.id).removeMembers(listOf(user.id)).enqueue() } }
Leaves a channel, after the user chooses the leave [ChannelAction]. It also removes the [activeChannelAction], to remove the dialog from the UI.