A chat room is the place where text messages are exchanged.
- Source:
Members
-
<readonly> core :external:LinphoneCore
-
Returns back pointer to LinphoneCore object.
Type:
- Source:
-
<readonly> historySize :number
-
Gets the number of messages in a chat room.
Type:
- number
- Source:
-
<readonly> peerAddress :external:LinphoneAddress
-
get peer address
Type:
- Source:
-
<readonly> remoteComposing :boolean
-
Tells whether the remote is currently composing a message.
Type:
- boolean
- Source:
Methods
-
compose() → {void}
-
Notifies the destination of the chat message being composed that the user is typing a new message.
- Source:
Returns:
- Type
- void
-
getHistoryRange(begin, end) → {Array.<Object>}
-
Gets the partial list of messages in the given range, sorted from oldest to most recent.
Parameters:
Name Type Description beginnumber The first message of the range to be retrieved. History most recent message has index 0. endnumber The last message of the range to be retrieved. History oldest message has index of history size - 1 (use - Source:
Returns:
- Type
- Array.<Object>
-
newFileTransferMessage(initial_content) → {external:LinphoneChatMessage}
-
Create a message attached to a dedicated chat room with a particular content. Use
Parameters:
Name Type Description initial_contentexternal:LinphoneContent initial content. LinphoneCoreVTable.file_transfer_send is invoked later to notify file transfer progress and collect next chunk of the message if LinphoneContent.data is NULL. - Source:
Returns:
-
newMessage(message) → {external:LinphoneChatMessage}
-
Create a message attached to a dedicated chat room;
Parameters:
Name Type Description messagestring text message, NULL if absent. - Source:
Returns:
-
newMessage2(message, external_body_url, state, time, is_read, is_incoming) → {external:LinphoneChatMessage}
-
Create a message attached to a dedicated chat room;
Parameters:
Name Type Description messagestring text message, NULL if absent. external_body_urlstring the URL given in external body or NULL. statelinphone.ChatMessageState the LinphoneChatMessage.State of the message. timeexternal:time_t the time_t at which the message has been received/sent. is_readboolean TRUE if the message should be flagged as read, FALSE otherwise. is_incomingboolean TRUE if the message has been received, FALSE otherwise. - Source:
Returns:
-
sendMessage2(msg, status_cb, ud) → {void}
-
Send a message to peer member of this chat room.
Parameters:
Name Type Description msgexternal:LinphoneChatMessage message to be sent status_cbexternal:LinphoneChatMessageStateChangedCb LinphoneChatMessageStateChangeCb status callback invoked when message is delivered or could not be delivered. May be NULL udvoid user data for the status cb. - Source:
Returns:
- Type
- void