Comment on page
Open a chat
openStreamfunction exposed by the SDK allows you to open a conversation or switch to a different conversation, specified by its
In Focus mode, if a selector is provided, the SDK will either create a new iFrame and add the chat in it, or, if the container already included a chat, it will update the chat.
If the second parameter is not provided, or if in Collaboration mode, the chat will be opened in the
mainiFrame (the one that was created with the
Open a different chat in the main iFrame:
Open a chat in a specific container:
// You can also refer to a div by ID, with #
startRoomfunction will let you start a direct message or group chat with specific users.
Similarly to the
openStreamfunction, while in Focus mode, you can pass a
containerSelectorparameter to open the chat in a specific container.
If a direct message or group chat with the user(s) already exists, it will open it. If it does not exist, it will create and open one.
Open a direct message in the main iFrame with a user identified by their user ID:
Open a group chat in a specific container with two users (one identified by their user ID, and one identified by their email address):
Last modified 4mo ago