Documentation - v1.2.0-alpha.10
    Preparing search index...

    A handler for processing Microsoft Teams-specific activities. Extends the ActivityHandler class to provide additional Teams-specific functionality. This class includes methods for handling various Teams events, such as message updates, channel events, and meeting events.

    Hierarchy

    • ActivityHandler
      • TeamsActivityHandler
    Index

    Constructors

    Properties

    Methods

    defaultNextEvent dispatchConversationUpdateActivity dispatchEventActivity dispatchMessageDeleteActivity dispatchMessageReactionActivity dispatchMessageUpdateActivity handle handleTeamsAnonymousAppBasedLinkQuery handleTeamsAppBasedLinkQuery handleTeamsCardActionInvoke handleTeamsConfigFetch handleTeamsConfigSubmit handleTeamsFileConsent handleTeamsFileConsentAccept handleTeamsFileConsentDecline handleTeamsMessagingExtensionCardButtonClicked handleTeamsMessagingExtensionConfigurationQuerySettingUrl handleTeamsMessagingExtensionConfigurationSetting handleTeamsMessagingExtensionFetchTask handleTeamsMessagingExtensionMessagePreviewEdit handleTeamsMessagingExtensionMessagePreviewSend handleTeamsMessagingExtensionQuery handleTeamsMessagingExtensionSelectItem handleTeamsMessagingExtensionSubmitAction handleTeamsMessagingExtensionSubmitActionDispatch handleTeamsTaskModuleFetch handleTeamsTaskModuleSubmit on onAdaptiveCardInvoke onConversationUpdate onConversationUpdateActivity onDialog onEndOfConversation onEndOfConversationActivity onInstallationUpdate onInstallationUpdateActivity onInstallationUpdateAdd onInstallationUpdateRemove onInvokeActivity onMembersAdded onMembersRemoved onMessage onMessageActivity onMessageDelete onMessageDeleteActivity onMessageReaction onMessageReactionActivity onMessageUpdate onMessageUpdateActivity onReactionsAdded onReactionsRemoved onSearchInvoke onSignInInvoke onSigninInvokeActivity onTeamsChannelCreated onTeamsChannelCreatedEvent onTeamsChannelDeleted onTeamsChannelDeletedEvent onTeamsChannelRenamed onTeamsChannelRenamedEvent onTeamsChannelRestored onTeamsChannelRestoredEvent onTeamsMeetingEnd onTeamsMeetingEndEvent onTeamsMeetingParticipantsJoin onTeamsMeetingParticipantsJoinEvent onTeamsMeetingParticipantsLeave onTeamsMeetingParticipantsLeaveEvent onTeamsMeetingStart onTeamsMeetingStartEvent onTeamsMembersAdded onTeamsMembersAddedEvent onTeamsMembersRemoved onTeamsMembersRemovedEvent onTeamsMessageEdit onTeamsMessageEditEvent onTeamsMessageSoftDelete onTeamsMessageSoftDeleteEvent onTeamsMessageUndelete onTeamsMessageUndeleteEvent onTeamsReadReceipt onTeamsReadReceiptEvent onTeamsTeamArchived onTeamsTeamArchivedEvent onTeamsTeamDeleted onTeamsTeamDeletedEvent onTeamsTeamHardDeleted onTeamsTeamHardDeletedEvent onTeamsTeamRenamed onTeamsTeamRenamedEvent onTeamsTeamRestored onTeamsTeamRestoredEvent onTeamsTeamUnarchived onTeamsTeamUnarchivedEvent onTurn onTurnActivity onTyping onTypingActivity onUnrecognizedActivity onUnrecognizedActivityType run createInvokeResponse

    Constructors

    Properties

    handlers: { [type: string]: AgentHandler[] }

    Collection of handlers registered for different activity types

    Methods

    • Protected

      Returns the default next event handler. This method creates a function that calls the default handler.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns () => Promise<void>

      A function that calls the default handler

    • Protected

      Dispatches the MessageReaction activity. This method dispatches message reaction activities to the appropriate handlers.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Protected

      Executes the handlers for a specific activity type. This method calls each registered handler for the specified activity type.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      • type: string

        The activity type to handle

      • onNext: () => Promise<void>

        The function to call when all handlers have been executed

      Returns Promise<any>

      The value returned by the last handler

    • Protected

      Registers a handler for a specific activity type. This method adds a handler to the list of handlers for a specific activity type.

      Parameters

      • type: string

        The activity type to register the handler for

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the AdaptiveCardInvoke activity. This method processes adaptive card invoke activities.

      Parameters

      • _context: TurnContext

        The turn context for the current turn of conversation

      • _invokeValue: AdaptiveCardInvokeValue

        The adaptive card invoke value

      Returns Promise<AdaptiveCardInvokeResponse>

      A promise that resolves to an adaptive card invoke response

    • Registers a handler for the ConversationUpdate activity type. This is called when the conversation is updated, such as when members are added or removed.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the ConversationUpdate activity. This method processes conversation update activities.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers an activity event handler for the dialog event, emitted as the last event for an incoming activity. This handler is called after all other handlers have been processed.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Registers a handler for the EndOfConversation activity type. This is called when the conversation ends.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the EndOfConversation activity. This method processes end of conversation activities.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers a handler for the InstallationUpdate activity type. This is called when an agent is installed or uninstalled.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the InstallationUpdate activity. This method processes installation update activities.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers a handler for the InstallationUpdateAdd activity type. This is called when an agent is installed or upgraded.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Registers a handler for the InstallationUpdateRemove activity type. This is called when an agent is uninstalled or downgraded.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Registers a handler for the MembersAdded activity type. This is called when new members are added to the conversation.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Registers a handler for the MembersRemoved activity type. This is called when members are removed from the conversation.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Registers a handler for the Message activity type. This is called when a message is received from the user.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the Message activity. This method processes incoming message activities.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers a handler for the MessageDelete activity type. This is called when a message is deleted.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the MessageDelete activity. This method processes message deletion activities.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers a handler for the MessageReaction activity type. This is called when reactions are added or removed from messages.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the MessageReaction activity. This method processes message reaction activities.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers a handler for the MessageUpdate activity type. This is called when a message is updated.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the MessageUpdate activity. This method processes message update activities.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers a handler for the ReactionsAdded activity type. This is called when reactions are added to messages.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Registers a handler for the ReactionsRemoved activity type. This is called when reactions are removed from messages.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the SearchInvoke activity. This method processes search invoke activities.

      Parameters

      • _context: TurnContext

        The turn context for the current turn of conversation

      • _invokeValue: SearchInvokeValue

        The search invoke value

      Returns Promise<SearchInvokeResponse>

      A promise that resolves to a search invoke response

    • Registers a handler for the SignInInvoke activity type. This is called when a sign-in is requested.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the SignInInvoke activity. This method processes sign-in invoke activities.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers a handler for Teams read receipt event.

      Parameters

      • handler: (
            receiptInfo: ReadReceiptInfo,
            context: TurnContext,
            next: () => Promise<void>,
        ) => Promise<void>

        The handler function.

      Returns this

    • Registers a handler for the Turn activity type. This is called for all activities regardless of type.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the Turn activity. This method is called for every activity type and dispatches to the appropriate handler.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers a handler for the Typing activity type. This is called when a typing indicator is received.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Protected

      Handles the Typing activity. This method processes typing indicator activities.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Protected

      Handles unrecognized activity types. This method processes activities with unrecognized types.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

    • Registers a handler for unrecognized activity types. This is called when an activity type is not recognized.

      Parameters

      • handler: AgentHandler

        The handler to register

      Returns this

      The current instance for method chaining

    • Runs the activity handler pipeline. This method is called to process an incoming activity through the registered handlers.

      Parameters

      • context: TurnContext

        The turn context for the current turn of conversation

      Returns Promise<void>

      Error if context is missing, activity is missing, or activity type is missing

    • Protected

      Creates an InvokeResponse object. This static method creates an invoke response with the specified body.

      Parameters

      • Optionalbody: any

        The body of the response

      Returns InvokeResponse

      An invoke response object with status and body