This is mainly used in this project for the sendRawMessage
function.
The message object consists of these properties:
id
(string, required): a type 4 (random) UUID that is prepended withMSG-
senderId
(string, required): The user ID of the sender. It needs to be the same as the authenticated user who is sending the message.recipientId
(string, required): The recipient's User ID.messageType
(enum string, required): Can be"Text"
,"Object"
,"Sound"
or"SessionInvite"
.sendTime
(ISO time formatted string, required): The time that the message is sent, in ISO 8601 format. This is required to be within a couple seconds of the message being sent, so it's highly recommended you use theDate.now()
function.lastUpdateTime
(ISO time formatted string, required): Same properties assendTime
, except it tracks when the message was last updated.content
(various, optional): Can be of type string for theText
message type, and a specific object for all other types.