Message

Message

new Message(type, id) → {Class}

Class Message, to build the message
Example
let msg = new WebIM.message('txt', id);
Parameters:
Name Type Description
type String Message type, optional value: txt、cmd、custom、location、img、audio、file、video、channel、delivery、read
id String Message id
Returns:
Message instance
Type
Class

Classes

channel
cmd
custom
delivery
img
location
read
txt

Methods

setChatType(chatType)

set chat type
Example
message.setChatType('singleChat')
Parameters:
Name Type Description
chatType String Message type, optional value: singleChat、groupChat、chatRoom
Returns:
Void