0

We are trying to provide updates about a background to user (in MS Teams app). The code used to updateActivity is as follows,

this.adapter.continueConversation(conversationReference, async (context) => {
      let activity = MessageFactory.attachment(CardFactory.adaptiveCard(card));
      activity.id = request.id;
      activity.serviceUrl = request.serviceUrl;
      activity.conversation = request.conversation;
      await context.updateActivity(activity);
    });
Error: Unknown
    at new RestError (/usr/src/app/node_modules/@azure/ms-rest-js/dist/msRest.node.js:1397:28)
    at /usr/src/app/node_modules/@azure/ms-rest-js/dist/msRest.node.js:1849:37
    at process._tickCallback (internal/process/next_tick.js:68:7)

Note that sendActivity works correctly. The error 'Unknown' is not really helpful though.

  • Does this help? https://stackoverflow.com/a/55174866/2122672 – Kyle Delaney Jul 23 '19 at 23:37
  • I have used this stackoverflow post as a reference while creating the application. Unfortunately it does not work for me. – Asif Pathan Jul 25 '19 at 15:14
  • Can you give any more context? It's unclear to me why you're `this.adapter.continueConversation` instead of just handling an event in the bot's `onTurn` function. Where is `request` coming from and how are you verifying that it contains the correct data? – Kyle Delaney Jul 25 '19 at 18:33
  • @KyleDelaney The `this.adapter.continueConversation` is used to post an update without user intervention after the initial task is submitted by the user. The `request` object is nothing but the initial response activity sent by the bot to the user in reply to task submitted by user. So the flow is something like this - 1. User submits a request 2. Bot responds with acknowledgement and we store this activity i.e. request in above code (needs to be renamed - leftover from previous attempt) 3. Bot does some work and on some logical step completion tries to update the activity stored in step 2. – Asif Pathan Jul 29 '19 at 15:15
  • 1
    Can you update your question to include an actual question? – Kyle Delaney Aug 01 '19 at 19:30
  • I will need a lot more information in order to help you. You need to provide steps to help me reproduce the problem, which means you will need to create a minimum verifiable example (and likely solve your own problem in the process). Please update your question rather than posting new information in comments, and also include screenshots. The Asking topic in the help center provides a lot of information that you should use in order to get the answers you need: https://stackoverflow.com/help/minimal-reproducible-example – Kyle Delaney Aug 01 '19 at 23:37
  • Are you still working on this? – Kyle Delaney Aug 13 '19 at 20:24
  • Hey Kyle, sorry for delayed reply. The feature associated with this issue has been put on hold so I haven't been able to create a gist of code. I will post a new question when I have done so. Thanks! – Asif Pathan Aug 25 '19 at 13:44

0 Answers0