1
votes

I'm using DirectLineClient in c# to send message to the Bot, but I also have an other user via webchat using bot framework embeded chat, and there are some message I don't want they see (webchat users), there is any way to hide this message through the activity message? I was trying the following code but it doesn't work,

Sending an PostBack Action, that create a private chat between Bot:SenderMessageuser, even with this other users in web chat are able to see the message.

            Activity userMessage = new Activity
            {
                From = new ChannelAccount("User1", "User Name"),
                Text = JsonVar,
                Type = ActivityTypes.Message,
                ChannelId = "webchat",
                Action = ActionTypes.PostBack,
                Conversation = conversation 
            };

            await client.Conversations.PostActivityAsync(conversationId, userMessage.);

Any Idea to hide message in an activity?, thank you in advance.

1

1 Answers

1
votes

In the messagesController, at the very first line:

if(activity.ChannelId=="webchat")
{
 activity.Text = string.empty;
}