UpdateActivityHandler type

A handler that can participate in update activity events for the current turn.

type UpdateActivityHandler = (
  context: TurnContext,
  activity: Partial<Activity>,
  next: () => Promise<void>
) => Promise<void>

Remarks

Parameters

Name Type Description
context TurnContext The context object for the turn.
activities Partial<Activity> The replacement activity.
next () => Promise<void> The function to call to continue event processing.

A handler calls the next function to pass control to the next registered handler. If a handler doesn’t call the next function, the adapter does not call any of the subsequent handlers and does not attempt to update the activity.

The activity parameter's id property indicates which activity in the conversation to replace.

See also