Hi
I try to send a message to a chat using the code below
function send_chat_message(msg_text, channel_id) {
log(about to send the msg ${msg_text} to chanell ${channel_id}
)
wixChatBackend.sendMessage({
“messageText” : msg_text,
“channelId” : channel_id,
“sendAsVisitor” : false
})
.then(() => {
log(managed to send the msg to channel ${channel_id}
)
})
. catch ((error) => {
err(failed to send msg: ${error.message}}
)
})
}
The code fails with error.message: "t he last argument to .catch() must be a function, got TypeError: logger_1.default.debug is not a function "
Any idea?