// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using Microsoft.Teams.Api; using Microsoft.Teams.Api.Activities; using Microsoft.Teams.Apps.Events; namespace Microsoft.Teams.Apps.Plugins; /// /// a plugin that can send activities /// public interface ISenderPlugin : IPlugin { /// /// called by the `App` /// to send an activity /// /// the activity to send /// the conversation reference /// the sent activity public Task Send(IActivity activity, ConversationReference reference, CancellationToken cancellationToken = default); /// /// called by the `App` /// to send an activity /// /// the activity type /// the activity to send /// the conversation reference /// the sent activity public Task Send(TActivity activity, ConversationReference reference, CancellationToken cancellationToken = default) where TActivity : IActivity; /// /// called by the `App` /// to create a new activity stream /// /// the conversation reference /// a new stream public IStreamer CreateStream(ConversationReference reference, CancellationToken cancellationToken = default); /// /// process an activity /// public Task Do(ActivityEvent @event, CancellationToken cancellationToken = default); }