title: Telegraf and Heroku not sending the first reply on webhook [nodejs]
body: <p>I am tring to write a simple bot that after some task reply with a text.</p>
  <p>The bot offline with app.polling is working perfectly. But when I deploy it on heroku, if I write only one ctx.reply(), no message is sent. If I write it twice, one message is sent on telegram. You can see the code on the snippet below, I included only the necessary code (the log show me with console.log that all the function are working and the final text is ready to be sent, I also commented the code a little to exlpain better the situation).</p>
  <p>So this appear strange to me,can anyone explain why?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const Telegraf = require('telegraf');
  const request = require('request');
  const date = require('date-and-time');
  const API_TOKEN = process.env.API_TOKEN || ''; //the api token is into env var
  const PORT = process.env.PORT || 3000;
  const URL = process.env.URL || 'url of my heroku account';
  
  
  const app = new Telegraf(API_TOKEN);
  
  app.telegram.setWebhook(`${URL}/bot${API_TOKEN}`);
  app.startWebhook(`/bot${API_TOKEN}`, null, PORT);
  
    function getdata(ctx,stazione1,stazione2){
      let tempo = gettempo();
      let linkget = '....';
      var options = {
        url: linkget,
        headers: {
          'Referer':'http://m.trenord.it/site-lite/index.html',
          'secret': '...'
        }
      }; 
      let linkget1 = '...';
      var options1 = {
        url: linkget1,
        headers: {
          'Referer':'...',
          'secret': '...'
        }
      }; 
      request(options, function(error, response, body){
          request(options1, async function(error1, response1, body1){
              let text = await gettext(body,stazione1,stazione2);//return text
              let text1 = await gettext(body1,stazione2,stazione1);//return text
              let final = await text+"\r\n\r\n"+text1;
              console.log(ctx);
              //here is the problem, if i write only one reply no message is sent on the bot, but if i wrtite it twice one message is sent. 
              ctx.replyWithMarkdown(final);
              ctx.replyWithMarkdown(final);            
          });
  
      });
  
  }//getdata
  
   app.command('pl', function(ctx){
     getdata(ctx,stazione1,stazione2); 
   });</code></pre>
  </div>
  </div>
  </p>
  <p><strong>NEWS</strong></p>
  <p>I want to add some feedback while the server works, so I add a ctx.reply(&quot;searching...&quot;) after the command right before the function getdata is launched. Now all two messages are sent to telegram. On the previous case is possible that heroku &quot;shut down the webhook&quot; and at the first ctx.reply was wake up and than at the second ctx.reply the message was sent?</p>