My Flow 1- Created Azure bot in python.(focusing on member added activity and send message activity only) 2- Deployed Bot on azure and changed messaging endpoint of bot with my api url where i want these activities responses
3- Added teams in bot channels.
4- Share the bot URL to teams client.
Problem -> If i run this bot in 'Test in Web Chat' its working fine. I mean It is providing me OnMembersAdded activity response automatically.
But if client add this bot to Teams then I am not getting OnMembersAdded activity response automatically. Client has to send his first message. If he sends message then after i get this activity.
On Client Added To Teams-> No response. Client sends his first message -> Getting OnMembersAdded activity response + OnMessage activity response
This OnMembersAdded Activity should be trigger when member is added not after sending first message.
Also tried with 'on_teams_members_added' activity but its not sending welcome message to Teams at all.
async def on_teams_members_added( # pylint: disable=unused-argument
self,
teams_members_added: [TeamsChannelAccount],
team_info: TeamInfo,
turn_context: TurnContext,
):
for member in teams_members_added:
if member.id != turn_context.activity.recipient.id:
await turn_context.send_activity(
f"Welcome!!"
)