Skip to main content

Message

When a new chat message is sent this event is triggered.

JavaScript

frame1.on("message", (message) => {
console.log("new message", message);
});

Properties

PropertiesDescriptionType
_idid of the messageString
likesarray of likesArray
createdwhen the chat message was createdString
chatRoomchat room idString
messagemessage that was sentString
useruser objectObject
Customercustomer idString

user

PropertiesDescriptionType
_idid of the userString
usernameusername of the userString
claimedthe user profile is claimed or not (to be deprecated)Boolean
verifiedthe user profile is verified or not (to be deprecated)Boolean
customercustomer idString
emailuser emailString
parentCustomerAccountcustomer idString
createdwhen the message was createdString
updatedwhen the message was updatedString
JSON Sample Response
{
"_id": "632a11a5f0357f1c648791eb",
"likes": [],
"created": "2022-09-20T19:16:53.848Z",
"chatRoom": "631794a83671700c713b1ce6",
"message": "fsdfsdfsdfsdsdfsd",
"user": {
"_id": "63233015c3aa3508a4c8fc34",
"username": "support",
"claimed": true,
"verified": true,
"customer": "631794a83671700c713b1ce5",
"email": "support@deadsimplechat.com",
"parentCustomerAccount": "631794a83671700c713b1ce5",
"created": "2022-09-15T14:00:53.180Z",
"updated": "2022-09-20T14:50:58.055Z",
"__v": 0,
"webSocketId": "MbXsd2tLpqwhiAE3AAAh"
},
"customer": "631794a83671700c713b1ce5"
}