RTKChat
This is the chat module, which can be used to send and receive messages from the meeting.
- RTKChat
- module.exports ⏏
- new module.exports(context, chatSocketHandler, self, participants)
.messages- .telemetry
- .pinned
- .setMaxTextLimit(limit)
- .sendMessageInternal(message, [participantIds])
- .sendTextMessageInternal(message, [peerIds])
- .sendImageMessageInternal(image, [peerIds])
- .sendFileMessageInternal(file, [peerIds])
- .updateRateLimits(num, period)
- .sendTextMessage(message, [peerIds])
- .sendCustomMessage(message, [peerIds])
- .sendImageMessage(image, [peerIds])
- .sendFileMessage(file, [peerIds])
- .sendMessage(message, [participantIds])
- .editTextMessage(messageId, message)
- .editImageMessage(messageId, image)
- .editFileMessage(messageId, file)
- .editMessage(messageId, message)
- .deleteMessage(messageId)
.getMessagesByUser(userId).getMessagesByType(type)- .pin(id)
- .unpin(id)
- .fetchPublicMessages(options)
- .fetchPrivateMessages(options)
- .fetchPinnedMessages(options)
.getMessages(timeStamp, size, reversed, [offset]).searchMessages(query, [filters])
- module.exports ⏏
| Param | Type |
|---|---|
| context | Context |
| chatSocketHandler | RTKChatSocketHandler |
| self | Self |
| participants | Participants |
Deprecated
Kind: instance property of module.exports
Kind: instance property of module.exports
Kind: instance property of module.exports
Deprecated.: This property is deprectated. Please use fetchPinnedMessages() instead.
Returns an array of pinned messages.
Set the max character limit of a text message
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| limit | number | Max character limit for a text message. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| message | MessagePayload | Message payload to send. |
| [participantIds] | Array.<string> | Participant ids to send the message to. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| message | string | Text message to send. |
| [peerIds] | Array.<string> | Peer ids to send the message to. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| image | File | ReactNativeFile | Image file to send. |
| [peerIds] | Array.<string> | Peer ids to send the message to. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| file | File | ReactNativeFile | File to send. |
| [peerIds] | Array.<string> | Peer ids to send the message to. |
Kind: instance method of module.exports
| Param | Type |
|---|---|
| num | number |
| period | number |
Sends a chat text message to the room.
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| message | string | The message that must be sent to the room. |
| [peerIds] | Array.<string> | Peer ids to send the message to. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| message | CustomMessagePayload | Custom message payload. |
| [peerIds] | Array.<string> | Peer ids to send the message to. |
Sends an image message to the meeting.
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| image | File | ReactNativeFile | The image that is to be sent. |
| [peerIds] | Array.<string> | Peer ids to send the message to. |
Sends a file to the meeting.
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| file | File | ReactNativeFile | A File object. |
| [peerIds] | Array.<string> | Peer ids to send the message to. |
Sends a message to the meeting. This method can be used to send text, image,
or file messages. The message type is determined by the key 'type' in message
object.
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| message | MessagePayload | An object including the type and content of the message. |
| [participantIds] | Array.<string> | An array including the userIds of the participants. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| messageId | string | Id of the message to edit. |
| message | string | Updated text message. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| messageId | string | Id of the message to edit. |
| image | File | ReactNativeFile | Updated image file. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| messageId | string | Id of the message to edit. |
| file | File | ReactNativeFile | Updated file. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| messageId | string | Id of the message to edit. |
| message | MessagePayload | Updated message payload. |
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| messageId | string | Id of the message to delete. |
Deprecated
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| userId | string | The user id of the user that sent the message. |
Deprecated
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| type | 'text' | 'image' | 'file' | 'custom' | 'poll' | 'text', 'image', 'file', 'custom', or 'poll'. |
Pins a chat message
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| id | string | ID of the message to be pinned |
Unpins a chat message
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| id | string | ID of the message to be unpinned |
Fetches messages from the chat with pagination.
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| options | FetchMessageOptions | Configuration options for fetching messages, including timestamp, limit, and direction for pagination. |
Fetches private messages between the current user and another participant with pagination.
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| options | FetchPrivateMessagesOptions | Configuration options for fetching private messages, including private RTKChat ID (User ID of the participant) and pagination settings. |
Fetches pinned messages with pagination.
Kind: instance method of module.exports
| Param | Type | Description |
|---|---|---|
| options | FetchMessageOptions | Configuration options for fetching pinned messages, including timestamp, limit, and direction. |
Deprecated
Kind: instance method of module.exports
| Param | Type | Default |
|---|---|---|
| timeStamp | number | |
| size | number | |
| reversed | boolean | |
| [offset] | number | 0 |
Deprecated
Kind: instance method of module.exports
| Param | Type |
|---|---|
| query | string |
| [filters] | SearchFilters |