Last updated
Last updated
sendTextMessage(roomId,body,txnId,callback)
roomId
: room id
body
: message content string
txnId
(optional):transaction id
callback
(optional):
N/A
sendImageMessage(roomId,url,info,txnId,callback)
roomId
: room id
url
: image url
info
(optional): image information
txnId
(optional):transaction id
callback
(optional):
N/A
sendNotice(roomId,body,txnId,callback)
roomId
: room id
body
: notice text string
txnId
(optional):transaction id
callback
(optional):
N/A
createMessagesRequest(roomId, fromToken, limit, dir)
roomId
: room id
fromToken
: Pagination identifier, pass an empty string for the first time, and pass the 'end' field returned from the previous call for subsequent calls.
limit
: number of events per page returned by the backend API.
dir
: direction, value is "b" | "f", where b: back, f: forward.
end
: pagination identifier, if not returned, indicates completion of retrieval.
chunk
: retrieved event data, returned as an array.
JavaScript Message APIs