Reputation: 1049
I would like to send the user a welcome message when they install my MS Teams Bot app. All the samples and documentation point to using the ActivityHandler onMembersAdded event. Unfortunately I can't get this event to fire. I also noticed that when installing the zip file in Teams and watching the requests in ngrok nothing happens; so I'm not entirely sure the problem is in my bot app. Is there something I need to do in the manifest?
If I chat with my app the onMessage event will fire, but like I said above, I need to send a "Welcome" message when the app is installed before the user starts typing.
Background: I created the manifest for my app using App Studio in Teams and exported it to a zip The node app is built with the using botbuilder 4.9.2
Upvotes: 2
Views: 1262
Reputation: 11
onMembersAddedAsync works everywhere, but not in Teams :) For Teams, there is a set of separate methods that work only in Teams. You need to use OnTeamsMembersAddedAsync. You can read more about that here: https://learn.microsoft.com/en-us/microsoftteams/platform/bots/how-to/create-a-bot-for-teams
Upvotes: 1