getDisplayName

fun Channel.getDisplayName(context: Context, currentUser: User? = ChatClient.instance().clientState.user.value, @StringRes fallback: Int, maxMembers: Int = 2): String

Returns the channel name if exists, or the list of member names if the channel is distinct.

Return

The display name of the channel.

Parameters

context

The context to load string resources.

currentUser

The currently logged-in user.

fallback

The resource identifier of a fallback string if the Channel object lacks information to construct a valid display name string.

maxMembers

The maximum number of members used to generate a name for a distinct channel.