User Id same as Conversation Id
See original GitHub issueHello,
Last week (2017/03/03) I created a NodeJS bot in Azure using “Basic” template and configure DirectLine channel.
I added this code in bot:
bot.on('lookupUser', function (address) {
if (address) {
var message = new builder.Message().address(address).text(JSON.stringify(address));
bot.send(message, function (err) {});
}
});
…to get a first message from bot including the deserialized address object with user and conversation ids. The client code to embed WebChat control in index.html is:
BotChat.App({
directLine: { secret: 'DIRECTLINE_SECRET_FROM_BOT_FRAMEWORK' },
user: { id: 'TOKEN_ID', name: 'User' }
}, document.getElementById("bot"));
Then, I got ‘TOKEN_ID’ in the bot message. That code works until 2017/03/03!
So, today (2017/03/06) I am receiving as user id the same value as conversation id. I tried creating a new bot and new secrets, but no way to get user id from BotChat.App again.
¿Something wrong in my code? ¿Something changed in DirecLine?
Thank you.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
User Id same as Conversation Id · Issue #357 - GitHub
Before the client sends any messages, this code fires and shows the user.id as the conversationID . So far as I know this...
Read more >Conversation ID | Docs | Twitter Developer Platform
The conversation_id field is always the Tweet ID of the original Tweet in the conversation reply thread. All Tweets within the same reply...
Read more >Guide to IDs in the Bot Framework - Bot Service | Microsoft Learn
Ordinal equality doesn't necessarily establish that two conversation IDs are the same conversation, although in most cases, it does. Activity ID.
Read more >Conversation ID, message ID, and links - Front Help Center
Conversation ID: This is an alphanumeric identifier that can be used to locate a conversation. When writing into our support team, please send ......
Read more >how to check if user id or conversation id or user alreadt exists ...
User message comes in (including userId and conversationId) · fetch user's conversation · if len(response['messages']) == 1 (messages in the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
By the way, you shouldn’t have to wait for the
connectionStatus
to change toOnline
.postActivity
does this internally. (Please let me know if it doesn’t). Also you don’t need to sendfrom: { id: conversationId }
, you can send the actual user id you want. UPDATE: I just tried this and indeedpostActivity
waits forconnectionStatus
to change toOnline
and then posts.Thanks @billba and @dandriscoll for your feedback. I resolved what I need (send data to bot before start the conversation) using this code in client:
Then, in bot code I added this middleware code to get data: