SkypeMentionNormalizeMiddleware Class
- java.
lang. Object - com.
microsoft. bot. builder. SkypeMentionNormalizeMiddleware
- com.
Implements
public class SkypeMentionNormalizeMiddleware
implements Middleware
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.
A Skype mention "text" field is of the format: <at id=\"28:2bc5b54d-5d48-4ff1-bd25-03dcbb5ce918\">botname</at> But Activity.Text doesn't contain those tags and RemoveMentionText can't remove the entity from Activity.Text. This will remove the <at> nodes, leaving just the name.
Constructor Summary
| Constructor | Description | |
|---|---|---|
| SkypeMentionNormalizeMiddleware() | ||
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static void |
normalizeSkypeMentionText(Activity activity)
Fixes incorrect Skype mention text. |
| java.util.concurrent.CompletableFuture<java.lang.Void> |
onTurn(TurnContext context, NextDelegate next)
Middleware implementation which corrects Entity. |
Methods inherited from java.lang.Object
Constructor Details
SkypeMentionNormalizeMiddleware
public SkypeMentionNormalizeMiddleware()
Method Details
normalizeSkypeMentionText
public static void normalizeSkypeMentionText(Activity activity)
Fixes incorrect Skype mention text. This will change the text value for all Skype mention entities.
Parameters:
onTurn
public CompletableFuture
Middleware implementation which corrects Entity.Mention.Text to a value RemoveMentionText can work with.
Parameters: