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

DCR: Add ability to create a ConversationReference from a TurnContext + ResourceResponse

Open yochay opened this issue 8 years ago • 3 comments

From @benbrown on October 29, 2018 20:0

SendActivities returns an array of ResourceResponses.

These ResourceResponses contain the activity id, which is a key value needed to call updateActivity or deleteActivity in the future. However, ResourceResponse does not necessarily contain all of the information required to construct a ConversationReference needed to actually call these methods.

Since the type of messages that will be deleted or updated are most likely to be those sent by the bot itself, we need to provide an easy to use method that takes a ResourceResponse returned from sendActivity and combines it with a TurnContext to create a reusable (and data-complete) ConversationReference.

Copied from original issue: Microsoft/botbuilder-js#586

yochay avatar Oct 30 '18 18:10 yochay

@benbrown , please ping @johnataylor once you are done with this.

yochay avatar Oct 30 '18 18:10 yochay

@johnataylor see attached PR on the Javascript repo! Turned out to be a very simple little function.

NOTE: The emulator does not support the update or delete activity methods, making this tricky to test.

benbrown avatar Nov 21 '18 21:11 benbrown

Re-opening so that we can track the c# version!

benbrown avatar Nov 21 '18 21:11 benbrown