The "chatview" namespace groups methods pertaining to views for one-on-one chats.
- Source:
Methods
(static) get(jids) → {_converse.ChatBoxView|undefined}
Get the view of an already open chat.
Parameters:
Name | Type | Description |
---|---|---|
jids |
Array.string | string |
- Source:
Returns:
The chat should already be open, otherwise undefined
will be returned.
- Type
- _converse.ChatBoxView | undefined
Examples
// To return a single view, provide the JID of the contact:
_converse.api.chatviews.get('buddy@example.com')
// To return an array of views, provide an array of JIDs:
_converse.api.chatviews.get(['buddy1@example.com', 'buddy2@example.com'])