Conversation (Chat)
Last updated
Last updated
A conversation(chat) object lets you have conversations with 1 or more .
You can view how a chat object can be created for a or a with multiple members.
This is called whenever the current user receives a new message.
Response
Field | Type | Description |
---|
This is called whenever a message gets updated in the chat.
Response
This is called whenever a message gets deleted.
Response
This is called whenever a participant of the conversation starts typing.
Response
This is called whenever a participant of the conversation stops typing.
Response
This is called whenever a message has been seen by a participant in a conversation
Response
This is called whenever the status of a user in a conversation changes from online to offline or vice versa.
Response
Messages retrieved in a conversation are paginated to 25 messages at a time.
Parameters
Response
To send a message, call a function on the chat object.
Message
Parameters
Callback
Parameters
Message
Parameters
Callback
Parameters
Get the id of the conversation, returns a string
Get the title of the conversation, returns a string
Get the avatar of the chat, returns a string
which is the url to the avatar
Get an array of ids of all the members of this conversation
get an optional key value pair for any additional chat information.
Add any additional chat information.
Parameters
Add a member to a group chat
add a member to a group chat using a member ID
Remove a member from a group chat
Remove a member from a group chat using a member ID
Call this function to notify everyone who is a participant of the conversation that the current user has started typing
Call this function to notify everyone who is a participant of the conversation that the current user has stopped typing
Call this function to notify participants of the conversation that a message has been seen. (useful when handling message seen states).
Parameters
Field | Type | Description |
---|
Field | Type | Description |
---|
Field | Type | Description |
---|
Field | Type | Description |
---|
Field | Type | Description |
---|
Field | Type | Description |
---|
Field | Type | State | Description |
---|
Field | Type | Description |
---|
Field | Type | State | Description |
---|
Field | Type | Description |
---|
Field | Type | State | Description |
---|
Field | Type | State | Description |
---|
Field | Type | Description |
---|
Field | Type | Description |
---|
Get the most recent message sent in the conversation. Returns a object.
Get an array of all the of this conversation
Field | Type | State | Description |
---|
Field | Type | State | Description |
---|
|
| the id of the message that has been deleted. |
|
| the id of the message that has been seen |
|
| the id of the user who's status has changed |
status |
| the status of the user. an enum of either |
|
| optional | query a specific page of messages, each page contains 25 messages. if |
|
| optional | the text of the message |
|
| optional | upload a file as an attachment |
|
| optional | an optional key value pair for any additional message information such as custom font size, font type, or |
|
| required | the id of the message to be updated |
|
| optional | the text of the message |
|
| optional | upload a file as an attachment |
|
| optional | an optional key value pair for any additional message information such as custom font size, font type, or |
|
| the Id of the message to delete |
|
| required | an optional key value pair for any additional chat information. Accepts string, number and boolean values |
|
| optional | the id of the message. If left null or undefined then the last message in the conversation is set as seen by the connected user. |
| the message that has been received. |
| the message that has been updated. |
| the user that started typing |
| the user that stopped typing |
| array of messages |
|
| shows the current page of messages. each page contains 25 messages |
|
| shows the total number of messages that exist |
|
| shows the total number of pages of messages that exist. each page contains 25 messages |
| the message that was sent |
| the message that was updated |