XendBridge Chat SDK

For a third-party application to be able to get the history of messages and also send one, this SDK has to be implemented. Here are the steps to follow;

Installation

Using npm :

$ npm install xendbridgechat-sdk

Using yarn :

$ yarn add xendbridgechat-sdk
XendBridge Chat SDK

Usage

Examples

XendBridge Chat SDK provides only two distinct functions. GetMessageHistory and SendMessage.

The getMessageHistory takes the three arguments which are a public key(string), dispute reference(string), and a function called getAllChats.

getAllChats is a function that must be called as an argument in both getMessageHistory and sendMessage. It automatically fetches the history for you after a message is being sent or when an initial connection to the hub is made.

The sendMessage takes three arguments as well, being an object called ChatHubAddCommentModel which has props of email address, comment, sent by, recipient, base64Attachment, dispute reference, and sent at. The other arguments are the public key and the function getAllChats.

Last updated

Was this helpful?