Published Teams bot app does not respond to chat sent in Teams meeting unless we are also running the bot app locally
Using this sample bot project from Microsoft(https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/meetings-notification/nodejs), I created this project/repository(https://github.com/messibarbie/meetings-notification-bot). The teamsapp.yml file was empty in this bot project provided by Microsoft as can be seen in the below screenshot/Microsoft's repository while the teamsapp.local.yml file had the necessary lines written in it to run it successfully with Teams toolkit for visual studio code. I made use of that and some other project to write the required lines in teamsapp.yml file which can be seen in my repository and also in the below screenshots.
When the app works properly, the bot responds with an adaptive card in the meeting chat when we send a message to the bot from the meeting chat as can be seen in this below screenshot:
How the teamsapp.yml file provided in the sample by Microsoft looked:
How the teamsapp.yml file look after the lines that I have added in it:
When I ran the app locally, the environment variables in .env.local file got filled with the necessary values and the bot's functionality works as expected when I sideload the bot app in a meeting and post a chat to the bot from the meeting chat. The .env.dev file also has the same values for client id, object id, tenant id, oauth authority, oauth authority host, resource suffix, bot domain, bot endpoint, azure resource group name, subscription id and tenant id as the .env.local file. I have added screenshots of how those files look below.
However, after provisioning, deploying and publishing the bot app for my organization which happens based on teamapp.yml file using Teams toolkit and adding it in a meeting, I noticed that when I send a message to the bot by posting chat to the bot from the meeting chat, I noticed that the bot responds with an action which in this case is posting an adaptive card in the meeting chat only when I have the bot app running locally in my machine as well. When I stop running the app locally and try to replicate posting chat to the bot from the meeting chat, no adaptive card gets generated.
From my understanding, there looks to be issue with the api endpoint which the deployed app calls.
So, the question is:
1)Why is the published app calling local api endpoint of the bot? And why doesn't the published app work properly on its own when the bot app is not running locally? From my understanding, there is some issue in terms of the api endpoint that gets called by the published app but how can this be fixed?
2)Am I missing out on anything in the teamsapp.yml file or .env.dev file or is there anything that I can change in the teamsapp.yml or .env.dev file such that whenever I publish the app for my organization using teamsapp.yml, it will start working on its own without the need of also running the app locally in computer?
Screenshot of how .env.local file looks in my project:
Screenshot of how .env.dev file looks in my project:
My repository link- https://github.com/messibarbie/meetings-notification-bot