/** * @module botbuilder-dialogs-adaptive-teams */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { Expression, ExpressionParserInterface } from 'adaptive-expressions'; import { Channels } from 'botbuilder'; import { TurnPath } from 'botbuilder-dialogs'; import { OnConversationUpdateActivity } from 'botbuilder-dialogs-adaptive'; /** * Actions triggered when a Teams ConversationUpdateActivity with channelData.eventType == 'channelDeleted'. * Note: turn.activity.channelData.Teams has team data. */ export class OnTeamsChannelDeleted extends OnConversationUpdateActivity { public static readonly $kind = 'Teams.OnChannelDeleted'; public getExpression(parser: ExpressionParserInterface): Expression { return Expression.andExpression( Expression.parse( `${TurnPath.activity}.channelId == '${Channels.Msteams}' && ${TurnPath.activity}.channelData.eventType == 'channelDeleted'` ), super.getExpression(parser) ); } }