// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using Microsoft.Teams.Core;
using Microsoft.Teams.Core.Schema;

namespace AFBot;

internal class DropTypingMiddleware : ITurnMiddleware
{
    public Task OnTurnAsync(BotApplication botApplication, CoreActivity activity, NextTurn nextTurn, CancellationToken cancellationToken = default)
    {
        if (activity.Type == ActivityType.Typing) return Task.CompletedTask;
        return nextTurn(cancellationToken);
    }
}
