botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

How can I forcibly shut down a conversation with a user?

Open vaditya04 opened this issue 10 years ago • 3 comments

Question says it all.

If context is needed (though if someone answers it without reading the text below it's totally fine)...

I need to get users from two different channels talking to each other using the bot as an intermediary (see Issue #497 )

user1 sends message to user2's channelaccount, starting a new conversation for user2 in the process.

user2 replies, in which the message is addressed to user1 in his current conversation id.

The problem here is that m2 is not visible to User1 until he interacts with the bot (Issue #536). I'm not sure why.

My solution is to shut down user1's conversation after he messages user2. user2 will do the same thing, and so on.

(Note: assume they have each others' channel accounts)

vaditya04 avatar Jun 23 '16 17:06 vaditya04

User 1 talks to Bot on Conversation X User 2 talks to Bot on Conversation Y When a message comes in from User 1 on Conversation X, bot should send a new message with User2 Conversation Y When a message comes in from User 2 on Conversation Y, bot should send a new message with User1 Conversation X

This should work, we've had people do this before

tomlm avatar Jun 24 '16 01:06 tomlm

@tomlm Thanks for the response, reason why I'm asking for this is because of Issue #536)

User 1 talks to bot which messages User 2 on conversation Y, what happens is User 2 doesn't see anything. But when User 2 talks to the bot, both the User 1 message and the bot's response appear on screen for User 2

(This is happening on Web chat)

vaditya04 avatar Jun 24 '16 03:06 vaditya04

@tomlm Also, are there any code samples I can look at, if people have done this before?

Secondly, I'm curious about what should be in the 'From' field of the message in such cases.

vaditya04 avatar Jun 24 '16 03:06 vaditya04