Detect group chats in theme editor

You can use the theme editor to detect group chats. To detect group chats using your theme editor, take the following steps:

  1. Login to your TalkJS dashboard, and go to the Themes page.
  2. Find the theme for which you'd like to detect group chats, and select Edit.
  3. In the theme component in which you'd like to detect group chats, use the variable conversation.isGroupChat. Your changes are saved automatically.

Example

For example, if in the ConversationImage theme component you'd like to show participant avatars for conversations that are are group chats, you can use:

1<GroupChatImage t:if="{{ conversation.isGroupChat }}" participants="{{ conversation.participants }}" />

A conversation counts as a group chat (and so conversation.isGroupChat is true) when either of the following holds: