How to send initial messages in qiscus multichannel widget as if it from user?
In qiscus multichannel widget snippet code, you will find there is a new Qismo(AppId)
initiation code. In order for you to send a message as if it from user whenever user initiate chat, you could add additional object as the second parameter in the initiation part. This object could be an event callback to send message, like
...
s.onload = s.onreadystatechange = function() { new Qismo("myAppId", {
callbacks: {
roomChangedCallback(data) {
console.log('room has been loaded', data);
},
}
}); }
...
We have provided an example on how you could do this at https://codesandbox.io/s/multichannel-custom-callback-jku3g?fontsize=14&hidenavigation=1&theme=dark. Feel free to check it.