Message

JavaScript Widget Message API

Quick DM

window.chatWidgetApi.chatToAddress(address, callback)
Method NameParametersReturn Values

window.chatWidgetApi.chatToAddress

address: Recipient's wallet address

callback: A callback event that returns true for success and false for failure

N/A

Quick public group chat

window.chatWidgetApi.joinPublicRoom(roomID, callback)
NameDescriptionParametersResponse

window.chatWidgetApi.joinPublicRoom

Automatically join group chat and display the group chat page.

roomId: room ID

callback(optional): function

N/A

Get the number of unread messages

window.chatWidgetApi.getUnreadCounts((num)=>{console.log(num)})
Method NameDescriptionParametersReturn Values

window.chatWidgetApi.getUnreadCounts

Get the number of unread messages

Callback function: (num)=>{console.log(num)}

N/A

Last updated