SkypeMentionNormalizeMiddleware 類別

  • java.lang.Object
    • com.microsoft.bot.builder.SkypeMentionNormalizeMiddleware

實作

public class SkypeMentionNormalizeMiddleware
implements Middleware

要修補的中間件提及來自 Skype 的實體,因為它們不符合預期值。 如果使用提及,與 Skype 互動的 Bot 應該使用此中間件。

Skype 提及 “text” 字段的格式如下:<id=\“28:2bc5b54d-5d48-4ff1-bd25-03dcbb5ce918\”>botname 但 Activity.Text 不包含這些卷標,Remove MentionText 無法從 Activity.Text 移除實體。 這會移除節點,只留下名稱。

建構函式摘要

建構函式 Description
SkypeMentionNormalizeMiddleware()

方法摘要

修飾詞與類型 方法與描述
static void normalizeSkypeMentionText(Activity activity)

修正不正確的 Skype 提及文字。

java.util.concurrent.CompletableFuture<java.lang.Void> onTurn(TurnContext context, NextDelegate next)

修正實體的中間件實作。提及。將 Text為值 RemoveMentionText 可以使用。

方法繼承來源 java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

建構函式詳細資料

SkypeMentionNormalizeMiddleware

public SkypeMentionNormalizeMiddleware()

方法詳細資料

normalizeSkypeMentionText

public static void normalizeSkypeMentionText(Activity activity)

修正不正確的 Skype 提及文字。 這會變更所有 Skype 提及實體的文字值。

參數:

activity - 要更正的活動。

onTurn

public CompletableFuture onTurn(TurnContext context, NextDelegate next)

中間件實作會將 Entity.Mention.Text 更正為 Remove MentionText 可以使用的值。

參數:

context - 這個回合的內容物件。
next - 要呼叫以繼續 Bot 中間件管線的委派。

適用於