SkypeMentionNormalizeMiddleware class

Middleware to patch mention Entities from Skype since they don't conform to expected values. Bots that interact with Skype should use this middleware if mentions are used.

Remarks

A Skype mention "text" field is of the format: botname But Activity.Text doesn't contain those tags and RemoveMentionText can't remove the entity from Activity.Text. This will remove the nodes, leaving just the name.

Methods

normalizeSkypeMentionText(Activity)

Performs the normalization of Skype mention Entities.

onTurn(TurnContext, () => Promise<void>)

Middleware implementation which corrects the Entity text of type Mention to a value that removeMentionText can work with.

Method Details

normalizeSkypeMentionText(Activity)

Performs the normalization of Skype mention Entities.

static function normalizeSkypeMentionText(activity: Activity)

Parameters

activity

Activity

(xref:botframework-schema.Activity) containing the mentions to normalize.

onTurn(TurnContext, () => Promise<void>)

Middleware implementation which corrects the Entity text of type Mention to a value that removeMentionText can work with.

function onTurn(turnContext: TurnContext, next: () => Promise<void>): Promise<void>

Parameters

turnContext
TurnContext

(xref:botbuilder-core.TurnContext) for the current turn of conversation.

next

() => Promise<void>

Delegate to call to continue the bot middleware pipeline.

Returns

Promise<void>