custom

Message. custom

new custom()

custom message
Returns:
message:object

Methods

set(options)

Building custom message
Example
let message = New Message('custom', id); message.set({to: 'user1', customEvent: 'gift', customExts: {name: 'rose'}, chatType: 'singleChat', success: function(){}, fail: function(){}})
Parameters:
Name Type Description
options Object -
Properties
Name Type Description
to String The userId of the message recipient, group ID, or chat room ID
customEvent String The custom event
customExts Object The custom event extention
chatType String chat type, optional value: singleChat、groupChat、chatRoom
success function A callback that the message was sent successfully
fail function Callback for message sending failure
Returns:
Void