Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Add direct_mention support to Webex Teams adapter #2222

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/botbuilder-adapter-webex/src/webex_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,10 @@ export class WebexAdapter extends BotAdapter {
if (activity.from.id === this.identity.id) {
activity.channelData.botkitEventType = 'self_message';
activity.type = ActivityTypes.Event;
} else if (activity.channelData.mentionedPeople &&
activity.channelData.mentionedPeople.includes(this.identity.id)) {
// this is someone trying to talk to the bot
activity.channelData.botkitEventType = 'direct_mention';
} else {
// change the event type of messages sent in 1:1s
if (activity.channelData.roomType === 'direct') {
Expand Down