ryanvolum / backChannelBot

This is a basic bot that uses the DirectLine backchannel to send and receive event messages to an instance of WebChat
20 stars 8 forks source link

How to send data from bot to webchat using typescript #4

Open zxr90 opened 7 years ago

zxr90 commented 7 years ago
const createEvent = (eventName, value, address) => {
    var msg = new builder.Message().address(address);
    msg.data.type = "event";
    msg.data.name = eventName;
    msg.data.value = value;
    return msg;
}

From your example, i tried to use msg.data but this is a protected method in the Message Class. How do i send custom data from the bot to the webchat?

zxr90 commented 7 years ago

Any advise on this?