Skip to content

Commit b4d2312

Browse files
authored
feat: add support for Teams meeting start/end events (#3757)
1 parent 1b027b0 commit b4d2312

File tree

9 files changed

+380
-54
lines changed

9 files changed

+380
-54
lines changed

libraries/botbuilder-core/src/activityHandler.ts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ export class ActivityHandler extends ActivityHandlerBase {
457457
* @param context The context object for the current turn.
458458
*
459459
* @remarks
460-
* Overwrite this method to use custom logic for emitting events.
460+
* Override this method to use custom logic for emitting events.
461461
*
462462
* The default logic is to call any handlers registered via [onTurn](xref:botbuilder-core.ActivityHandler.onTurn),
463463
* and then continue by calling [ActivityHandlerBase.onTurnActivity](xref:botbuilder-core.ActivityHandlerBase.onTurnActivity).
@@ -474,7 +474,7 @@ export class ActivityHandler extends ActivityHandlerBase {
474474
* @param context The context object for the current turn.
475475
*
476476
* @remarks
477-
* Overwrite this method to support channel-specific behavior across multiple channels.
477+
* Override this method to support channel-specific behavior across multiple channels.
478478
*
479479
* The default logic is to call any handlers registered via
480480
* [onMessage](xref:botbuilder-core.ActivityHandler.onMessage),
@@ -489,7 +489,7 @@ export class ActivityHandler extends ActivityHandlerBase {
489489
* @param context The context object for the current turn.
490490
*
491491
* @remarks
492-
* Overwrite this method to support channel-specific behavior across multiple channels.
492+
* Override this method to support channel-specific behavior across multiple channels.
493493
* The default logic is to check for a signIn invoke and handle that
494494
* and then continue by calling [defaultNextEvent](xref:botbuilder-core.ActivityHandler.defaultNextEvent).
495495
*/
@@ -531,7 +531,7 @@ export class ActivityHandler extends ActivityHandlerBase {
531531
* @param context The context object for the current turn.
532532
*
533533
* @remarks
534-
* Overwrite this method to support channel-specific behavior across multiple channels.
534+
* Override this method to support channel-specific behavior across multiple channels.
535535
*/
536536
protected async onSignInInvoke(context: TurnContext): Promise<void> {
537537
throw new InvokeException(StatusCodes.NOT_IMPLEMENTED);
@@ -556,7 +556,7 @@ export class ActivityHandler extends ActivityHandlerBase {
556556
* @param context The context object for the current turn.
557557
*
558558
* @remarks
559-
* Overwrite this method to support channel-specific behavior across multiple channels.
559+
* Override this method to support channel-specific behavior across multiple channels.
560560
*
561561
* The default logic is to call any handlers registered via
562562
* [onEndOfConversationActivity](xref:botbuilder-core.ActivityHandler.onMessage),
@@ -572,7 +572,7 @@ export class ActivityHandler extends ActivityHandlerBase {
572572
* @param context The context object for the current turn.
573573
*
574574
* @remarks
575-
* Overwrite this method to support channel-specific behavior across multiple channels.
575+
* Override this method to support channel-specific behavior across multiple channels.
576576
*
577577
* The default logic is to call any handlers registered via
578578
* [onTypingActivity](xref:botbuilder-core.ActivityHandler.onTypingActivity),
@@ -588,7 +588,7 @@ export class ActivityHandler extends ActivityHandlerBase {
588588
* @param context The context object for the current turn.
589589
*
590590
* @remarks
591-
* Overwrite this method to support channel-specific behavior across multiple channels.
591+
* Override this method to support channel-specific behavior across multiple channels.
592592
*
593593
* The default logic is to call any handlers registered via
594594
* [onInstallationUpdateActivity](xref:botbuilder-core.ActivityHandler.onInstallationUpdateActivity),
@@ -624,7 +624,7 @@ export class ActivityHandler extends ActivityHandlerBase {
624624
* @param context The context object for the current turn.
625625
*
626626
* @remarks
627-
* Overwrite this method to support channel-specific behavior across multiple channels or to add
627+
* Override this method to support channel-specific behavior across multiple channels or to add
628628
* custom conversation update sub-type events.
629629
*
630630
* The default logic is:
@@ -651,7 +651,7 @@ export class ActivityHandler extends ActivityHandlerBase {
651651
* @param context The context object for the current turn.
652652
*
653653
* @remarks
654-
* Overwrite this method to support channel-specific behavior across multiple channels.
654+
* Override this method to support channel-specific behavior across multiple channels.
655655
*
656656
* The default logic is to call any handlers registered via
657657
* [onInstallationUpdateAdd](xref:botbuilder-core.ActivityHandler.onInstallationUpdateAdd),
@@ -667,7 +667,7 @@ export class ActivityHandler extends ActivityHandlerBase {
667667
* @param context The context object for the current turn.
668668
*
669669
* @remarks
670-
* Overwrite this method to support channel-specific behavior across multiple channels.
670+
* Override this method to support channel-specific behavior across multiple channels.
671671
*
672672
* The default logic is to call any handlers registered via
673673
* [onInstallationUpdateRemove](xref:botbuilder-core.ActivityHandler.onInstallationUpdateRemove),
@@ -683,7 +683,7 @@ export class ActivityHandler extends ActivityHandlerBase {
683683
* @param context The context object for the current turn.
684684
*
685685
* @remarks
686-
* Overwrite this method to support channel-specific behavior across multiple channels.
686+
* Override this method to support channel-specific behavior across multiple channels.
687687
*
688688
* The default logic is to call any handlers registered via
689689
* [onUnrecognizedActivityType](xref:botbuilder-core.ActivityHandler.onUnrecognizedActivityType),
@@ -743,7 +743,7 @@ export class ActivityHandler extends ActivityHandlerBase {
743743
* @param context The context object for the current turn.
744744
*
745745
* @remarks
746-
* Overwrite this method to support channel-specific behavior across multiple channels.
746+
* Override this method to support channel-specific behavior across multiple channels.
747747
*
748748
* The default logic is to call any handlers registered via
749749
* [onConversationUpdate](xref:botbuilder-core.ActivityHandler.onConversationUpdate),
@@ -762,7 +762,7 @@ export class ActivityHandler extends ActivityHandlerBase {
762762
* @param context The context object for the current turn.
763763
*
764764
* @remarks
765-
* Overwrite this method to support channel-specific behavior across multiple channels or to add
765+
* Override this method to support channel-specific behavior across multiple channels or to add
766766
* custom conversation update sub-type events.
767767
*
768768
* The default logic is:
@@ -786,7 +786,7 @@ export class ActivityHandler extends ActivityHandlerBase {
786786
* @param context The context object for the current turn.
787787
*
788788
* @remarks
789-
* Overwrite this method to support channel-specific behavior across multiple channels.
789+
* Override this method to support channel-specific behavior across multiple channels.
790790
*
791791
* The default logic is to call any handlers registered via
792792
* [onMessageReaction](xref:botbuilder-core.ActivityHandler.onMessageReaction),
@@ -806,7 +806,7 @@ export class ActivityHandler extends ActivityHandlerBase {
806806
* @param context The context object for the current turn.
807807
*
808808
* @remarks
809-
* Overwrite this method to support channel-specific behavior across multiple channels.
809+
* Override this method to support channel-specific behavior across multiple channels.
810810
*
811811
* The default logic is to call any handlers registered via
812812
* [onReactionsAdded](xref:botbuilder-core.ActivityHandler.onReactionsAdded),
@@ -823,7 +823,7 @@ export class ActivityHandler extends ActivityHandlerBase {
823823
* @param context The context object for the current turn.
824824
*
825825
* @remarks
826-
* Overwrite this method to support channel-specific behavior across multiple channels.
826+
* Override this method to support channel-specific behavior across multiple channels.
827827
*
828828
* The default logic is to call any handlers registered via
829829
* [onReactionsRemoved](xref:botbuilder-core.ActivityHandler.onReactionsRemoved),
@@ -842,7 +842,7 @@ export class ActivityHandler extends ActivityHandlerBase {
842842
* @param context The context object for the current turn.
843843
*
844844
* @remarks
845-
* Overwrite this method to support channel-specific behavior across multiple channels or to add
845+
* Override this method to support channel-specific behavior across multiple channels or to add
846846
* custom message reaction sub-type events.
847847
*
848848
* The default logic is:
@@ -864,7 +864,7 @@ export class ActivityHandler extends ActivityHandlerBase {
864864
* @param context The context object for the current turn.
865865
*
866866
* @remarks
867-
* Overwrite this method to support channel-specific behavior across multiple channels.
867+
* Override this method to support channel-specific behavior across multiple channels.
868868
*
869869
* The default logic is to call any handlers registered via
870870
* [onEvent](xref:botbuilder-core.ActivityHandler.onEvent),
@@ -883,7 +883,7 @@ export class ActivityHandler extends ActivityHandlerBase {
883883
* @param context The context object for the current turn.
884884
*
885885
* @remarks
886-
* Overwrite this method to support channel-specific behavior across multiple channels or to add custom event sub-type events.
886+
* Override this method to support channel-specific behavior across multiple channels or to add custom event sub-type events.
887887
* For certain channels, such as Web Chat and custom Direct Line clients, developers can emit custom event activities from the client.
888888
*
889889
* The default logic is:
@@ -905,7 +905,7 @@ export class ActivityHandler extends ActivityHandlerBase {
905905
* @param context The context object for the current turn.
906906
*
907907
* @remarks
908-
* Overwrite this method to use custom logic for emitting events.
908+
* Override this method to use custom logic for emitting events.
909909
*
910910
* The default logic is to call any handlers registered via [onDialog](xref:botbuilder-core.ActivityHandler.onDialog),
911911
* and then complete the event emission process.

libraries/botbuilder-core/src/activityHandlerBase.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ActivityTypes, ChannelAccount, MessageReaction, TurnContext } from '.';
66
import { InvokeResponse } from './invokeResponse';
77
import { StatusCodes } from './statusCodes';
88

9-
// This key is exported internally so that subclassed ActivityHandlers and BotAdapters will not overwrite any already set InvokeResponses.
9+
// This key is exported internally so that subclassed ActivityHandlers and BotAdapters will not override any already set InvokeResponses.
1010
export const INVOKE_RESPONSE_KEY = Symbol('invokeResponse');
1111

1212
/**
@@ -37,7 +37,7 @@ export class ActivityHandlerBase {
3737
* @param context The context object for the current turn.
3838
*
3939
* @remarks
40-
* Overwrite this method to use custom logic for emitting events.
40+
* Override this method to use custom logic for emitting events.
4141
*
4242
* The default logic is to call any type-specific and sub-type handlers registered via
4343
* the various _on event_ methods. Type-specific events are defined for:
@@ -97,7 +97,7 @@ export class ActivityHandlerBase {
9797
* @param context The context object for the current turn.
9898
*
9999
* @remarks
100-
* Overwrite this method to run registered _message_ handlers and then continue the event
100+
* Override this method to run registered _message_ handlers and then continue the event
101101
* emission process.
102102
*/
103103
protected async onMessageActivity(context: TurnContext): Promise<void> {
@@ -110,7 +110,7 @@ export class ActivityHandlerBase {
110110
* @param context The context object for the current turn.
111111
*
112112
* @remarks
113-
* Overwrite this method to run registered _conversation update_ handlers and then continue the event
113+
* Override this method to run registered _conversation update_ handlers and then continue the event
114114
* emission process.
115115
*
116116
* The default logic is:
@@ -145,7 +145,7 @@ export class ActivityHandlerBase {
145145
* @param context The context object for the current turn.
146146
*
147147
* @remarks
148-
* Overwrite this method to run registered _message reaction_ handlers and then continue the event
148+
* Override this method to run registered _message reaction_ handlers and then continue the event
149149
* emission process.
150150
*
151151
* The default logic is:
@@ -168,7 +168,7 @@ export class ActivityHandlerBase {
168168
* @param context The context object for the current turn.
169169
*
170170
* @remarks
171-
* Overwrite this method to run registered _event_ handlers and then continue the event
171+
* Override this method to run registered _event_ handlers and then continue the event
172172
* emission process.
173173
*/
174174
protected async onEventActivity(context: TurnContext): Promise<void> {
@@ -181,7 +181,7 @@ export class ActivityHandlerBase {
181181
* @param context The context object for the current turn.
182182
*
183183
* @remarks
184-
* Overwrite this method to handle particular invoke calls.
184+
* Override this method to handle particular invoke calls.
185185
*/
186186
protected async onInvokeActivity(context: TurnContext): Promise<InvokeResponse> {
187187
return { status: StatusCodes.NOT_IMPLEMENTED };
@@ -193,7 +193,7 @@ export class ActivityHandlerBase {
193193
* @param context The context object for the current turn.
194194
*
195195
* @remarks
196-
* Overwrite this method to run registered _end of conversation_ handlers and then continue the event
196+
* Override this method to run registered _end of conversation_ handlers and then continue the event
197197
* emission process.
198198
*/
199199
protected async onEndOfConversationActivity(context: TurnContext): Promise<void> {
@@ -206,7 +206,7 @@ export class ActivityHandlerBase {
206206
* @param context The context object for the current turn.
207207
*
208208
* @remarks
209-
* Overwrite this method to run registered _typing_ handlers and then continue the event
209+
* Override this method to run registered _typing_ handlers and then continue the event
210210
* emission process.
211211
*/
212212
protected async onTypingActivity(context: TurnContext): Promise<void> {
@@ -219,7 +219,7 @@ export class ActivityHandlerBase {
219219
* @param context The context object for the current turn.
220220
*
221221
* @remarks
222-
* Overwrite this method to run registered _installationupdate_ handlers and then continue the event
222+
* Override this method to run registered _installationupdate_ handlers and then continue the event
223223
* emission process.
224224
*/
225225
protected async onInstallationUpdateActivity(context: TurnContext): Promise<void> {
@@ -241,7 +241,7 @@ export class ActivityHandlerBase {
241241
* @param context The context object for the current turn.
242242
*
243243
* @remarks
244-
* Overwrite this method to run registered _installationupdateadd_ handlers and then continue the event
244+
* Override this method to run registered _installationupdateadd_ handlers and then continue the event
245245
* emission process.
246246
*/
247247
protected async onInstallationUpdateAddActivity(context: TurnContext): Promise<void> {
@@ -254,7 +254,7 @@ export class ActivityHandlerBase {
254254
* @param context The context object for the current turn.
255255
*
256256
* @remarks
257-
* Overwrite this method to run registered _installationupdateremove_ handlers and then continue the event
257+
* Override this method to run registered _installationupdateremove_ handlers and then continue the event
258258
* emission process.
259259
*/
260260
protected async onInstallationUpdateRemoveActivity(context: TurnContext): Promise<void> {
@@ -267,7 +267,7 @@ export class ActivityHandlerBase {
267267
* @param context The context object for the current turn.
268268
*
269269
* @remarks
270-
* Overwrite this method to run registered _unrecognized_ handlers and then continue the event
270+
* Override this method to run registered _unrecognized_ handlers and then continue the event
271271
* emission process.
272272
*/
273273
protected async onUnrecognizedActivity(context: TurnContext): Promise<void> {
@@ -282,7 +282,7 @@ export class ActivityHandlerBase {
282282
* @param context The context object for the current turn.
283283
*
284284
* @remarks
285-
* Overwrite this method to run registered _members added_ handlers and then continue the event
285+
* Override this method to run registered _members added_ handlers and then continue the event
286286
* emission process.
287287
*/
288288
protected async onMembersAddedActivity(membersAdded: ChannelAccount[], context: TurnContext): Promise<void> {
@@ -297,7 +297,7 @@ export class ActivityHandlerBase {
297297
* @param context The context object for the current turn.
298298
*
299299
* @remarks
300-
* Overwrite this method to run registered _members removed_ handlers and then continue the event
300+
* Override this method to run registered _members removed_ handlers and then continue the event
301301
* emission process.
302302
*/
303303
protected async onMembersRemovedActivity(membersRemoved: ChannelAccount[], context: TurnContext): Promise<void> {
@@ -312,7 +312,7 @@ export class ActivityHandlerBase {
312312
* @param context The context object for the current turn.
313313
*
314314
* @remarks
315-
* Overwrite this method to run registered _reactions added_ handlers and then continue the event
315+
* Override this method to run registered _reactions added_ handlers and then continue the event
316316
* emission process.
317317
*/
318318
protected async onReactionsAddedActivity(reactionsAdded: MessageReaction[], context: TurnContext): Promise<void> {
@@ -327,7 +327,7 @@ export class ActivityHandlerBase {
327327
* @param context The context object for the current turn.
328328
*
329329
* @remarks
330-
* Overwrite this method to run registered _reactions removed_ handlers and then continue the event
330+
* Override this method to run registered _reactions removed_ handlers and then continue the event
331331
* emission process.
332332
*/
333333
protected async onReactionsRemovedActivity(

0 commit comments

Comments
 (0)