Conflicts due to multiple "installationUpdate" events when installing bot in a Team
I’m encountering an issue with my TeamsBot when adding it to a team's channel. Specifically, I receive two installationUpdate events:
- One event is triggered for the bot being installed in the team.
- The other event is for the personal installation (i.e., adding the bot for self).
The order of these events is not consistent. Sometimes, the first installationUpdate event is for the team installation, and sometimes it is for the personal installation.
This inconsistent order is causing conflicts in my code. I’m uncertain about how to handle user details when processing the installationUpdate events, particularly whether I should process user details in the context of the team installation or the personal installation.
Questions:
- How should I manage these events to avoid conflicts in my code?
- Is there a recommended approach for processing user details and handling the installation updates in a consistent manner?
Any guidance or best practices on managing these multiple installationUpdate events would be greatly appreciated.