generateChannelIdIfNeeded

fun generateChannelIdIfNeeded(channelId: String, memberIds: List<String>): String

Generates the channel id based on the member ids if provided channelId is empty. Member-based id should only be used for creating distinct channels. It is a local placeholder: the server names distinct channels differently, so it must never be sent as an id. Member ids are sorted, so the same members always give the same placeholder.

Return

channelId if not blank or new, member-based id.

Parameters

channelId

The channel id. ie 123.

memberIds

The list of members' ids.