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:
- Login to your TalkJS dashboard, and go to the Themes page.
- Find the theme for which you'd like to detect group chats, and select Edit.
- In the theme component in which you'd like to detect group chats, use the variable
conversation.isGroupChat
. Your changes are saved automatically.
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:
- The chat has three or more participants
- The chat has no participants, only guests