Teams Toolkit Bot - Storage Issues

25 Views Asked by At

Im storing the conversation reference object for users in a blob storage currently but after the bot updates it seems to lose the context for users anyways and I am unable to send messages to that conversation object.

I tried sending messages to bioth the conversation object and at one point, even the entire member object since thats how the bot seems to target for notifications. This is my code for the pertaining section

   try{
    const storedTarget = await storage.get(payload.memberId);
    if(!storedTarget){
      return res.send(404, "Member not found");
    }
    const conversationReference = storedTarget as ConversationReference;
    //continue conversaton
    await notificationApp.adapter.continueConversationAsync(
      'bot_id_number_here', 
      conversationReference,
      async (context) => {
        await context.sendActivity({
          type: 'message',
          text: 'Hello, This is a Test!'
        })
      }
    )
    res.send(200, "Success");
  } catch (error) {
    console.error("Error:", error);
    console.log("Member cannot receive card", target)
  }
0

There are 0 best solutions below