Update activity_handler.py
Added comments to n_conversation_update_activity method
@@ -65,13 +65,31 @@ class ActivityHandler:
:returns: A task that represents the work queued to execute
- .. remarks::
- The `OnTurnAsync` method calls this method when it receives a message activity.
-
"""
return
async def on_conversation_update_activity(self, turn_context: TurnContext):
+ """Invoked when a conversation update activity is received from the channel when the base behavior of
+ `OnTurnAsync` is used.
+ Conversation update activities are useful when it comes to responding to users being added to or removed from the conversation.
+ For example, a bot could respond to a user being added by greeting the user.
+ By default, this method calls :meth:`ActivityHandler.on_members_added_activity()` if any users have been added or
+ :meth:`ActivityHandler.on_members_removed_activity()` if any users have been removed.
+ The method checks the member ID so that it only responds to updates regarding members other than the bot itself.
+
+ :param turn_context: The context object for this turn
+ :type turn_context: :class:`TurnContext`
+ :returns: A task that represents the work queued to execute
+
+ .. remarks::
+ When the :meth:'ActivityHandler.on_turn()` method receives a conversation update activity, it calls this method.
+ If the conversation update activity indicates that members other than the bot joined the conversation,
+ it calls the :meth:`ActivityHandler.on_members_added_activity()` method.
+ If the conversation update activity indicates that members other than the bot left the conversation,
+ it calls the :meth:`ActivityHandler.on_members_removed_activity()` method.
+ In a derived class, override this method to add logic that applies to all conversation update activities.
+ Add logic to apply before the member added or removed logic before the call to this base class method.
+ """
if (
turn_context.activity.members_added is not None
and turn_context.activity.members_added
