The contactJoin
API allows to join as an participant to an existing chat room usually started by the customer on the corporate web site. Chat room ID and a nickname must be specified as input parameters.
The function returns a javascript Promise
with the instance of the chat contact. On the chat object it is possible to register custom callbacks to receive notifications of the following events:
message : event that notifies the receiving of a text message from a participant
messageReceived : event that notifies that a participant has received the message
messageSeen : event that notifies that a participant has read/seen the message
multimediaMessage : a multimedia message has been received. A multimedia message can be of two types: document (for example a DOC, DOCS, PDF, PPT, PPTX, XSL, XSLX, binary) or image (PNG, JPG, JPEG). The multimedia content is encoded in
Base64
format.link : an hyperlink has been received
isWriting : event that notifies that one participant started/stopped writing
contactEnded : the chat has just ended and all participants have been disconnected. The room chat ID is no longer active.
multimediaMessageStored :