question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ability to send "From Properties" when Directline is Init'ed

See original GitHub issue

Feature Request

directLine.postActivity({
    from: { id: 'myUserId', name: 'myUserName' }, // required (from.name is optional)
    type: 'message',
    text: 'a message for you, Rudy'
}).subscribe(
    id => console.log("Posted activity, assigned ID ", id),
    error => console.log("Error posting activity", error)
);

the From properties are only received when the user sends the first message… if the same provision is added when the user connects to the bot

var directLine = new DirectLine({
    secret: /* put your Direct Line secret here */,
    token: /* or put your Direct Line token here (supply secret OR token, not both) */,
    domain: /* optional: if you are not using the default Direct Line endpoint, e.g. if you are using a region-specific endpoint, put its full URL here */
    webSocket: /* optional: false if you want to use polling GET to receive messages. Defaults to true (use WebSocket). */,
    pollingInterval: /* optional: set polling interval in milliseconds. Default to 1000 */,
});

This would add features such as

  • greet the user by their name when they connect the bot
  • send proactive messages to the user when they are connected
  • greet the user based on time of day, such as good morning, good evening, etc

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
xtianus79commented, Aug 7, 2019

Great question and answer!

1reaction
cwhittencommented, Jul 24, 2019

see https://github.com/microsoft/BotBuilder-Samples/issues/1589 for an update on how the ConversationUpdate event is fired in the Direct Line protocol

Read more comments on GitHub >

github_iconTop Results From Across the Web

Receive activities from the bot in Direct Line API 3.0
These types are identified by the properties in the JSON root. An ActivitySet contains messages sent by the bot and by all users...
Read more >
Updating properties of Bot Framework WebChat control after it ...
I know I can update elements of the page the control is embedded on using DirectLine Backchannel, but I haven't figured out of...
Read more >
Your HOME insurancE PLUS policy booklet - Direct Line
We will cover the buyer of your home under. Section 1 until the sale completes, as long as the property isn't insured under...
Read more >
Locate and copy the Direct Line secret key in Microsoft Power Virtual ...
To use Power Virtual Agents with Virtual Agent Bot Interconnect, you must locate and copy the Direct Line security key in your Power...
Read more >
Direct Line Reviews | Read Customer Service Reviews of www ...
The final straw came this year, when they sent me a renewal notice 5 days after the policy had expired, leaving the property...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found