private fun updateUserMute(user: User) { val isUserMuted = chatClient.globalState.muted.value.any { it.target.id == user.id }  if (isUserMuted) { unmuteUser(user.id) } else { muteUser(user.id) } }
Mutes or unmutes the user that sent a particular message.