title: How to get message id of sent message Bot Framework (Teams channel)?
body: <p>I am using Bot Framework SDK for Javascript. My bot is connected to the Teams channel. Right now I am saving every outgoing and incoming message from my bot to the DB. </p>
  
  <p>But I want also to save reactions of user to my messages. That is why I am using <code>TeamsActivityHandler</code> and <code>onReactionsAdded</code> method (<a href="https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/conversations/subscribe-to-conversation-events?tabs=typescript#message-reaction-events" rel="nofollow noreferrer">link</a>). In the docs there is written that <code>replyToId</code> field of <code>turnContext</code> is the id of message user is reacting to.</p>
  
  <p>But when I am sending message to the user via <code>turnContext.sendActivity()</code> I don't know the internal id which will be given to this message on <strong>Teams</strong> side, that is why I can not pair reaction to the message stored in my db.</p>
  
  <p>So my question is, How can I get the id of the message after sending it via <code>turnContext.sendActivity()</code> which will be later send in <code>replyToId</code> field to <code>onReactionsAdded</code> handler?</p>
  
  <p>In other words I want to collect feedback (via reactions) on the messages my bot is sending to the user and save them to my DB (messages and reactions).</p>