channelMessage
When message is sent in a channel this event is triggered.
JavaScript
frame1.on("channelMessage", (message) => {
console.log("channelMessage", message);
});
Properties
Properties | Description | Type |
---|---|---|
_id | id of the user | String |
likes | likes array | Array |
created | when the channel message was sent | String |
user | user who sent the channel message | Object |
channel | channelId where the message was sent | String |
message | message | String |
User
Properties | Description | Type |
---|---|---|
_id | id of the user | String |
username | username of the user | String |
claimed | the user profile is claimed or not (to be deprecated) | Boolean |
verified | the user profile is verified or not (to be deprecated) | Boolean |
customer | customer id | String |
user email | String | |
parentCustomerAccount | customer id | String |
created | when the message was created | String |
updated | when the message was updated | String |
JSON Sample Response
{
"_id": "632a3cb9f0357f1c648791f4",
"likes": [],
"created": "2022-09-20T22:20:41.416Z",
"user": {
"_id": "63233015c3aa3508a4c8fc34",
"username": "dasdas",
"claimed": true,
"verified": true,
"customer": "631794a83671700c713b1ce5",
"email": "support@deadsimplechat.com",
"parentCustomerAccount": "631794a83671700c713b1ce5",
"created": "2022-09-15T14:00:53.180Z",
"updated": "2022-09-20T22:19:00.592Z",
"__v": 0,
"webSocketId": "0ieC-OWuXmVM6q4tAAAp"
},
"channel": "6325e6bef0357f1c648791a4",
"message": "hi"
}