Skip to content

Commit 80a30d8

Browse files
authored
Merge pull request #6966 from syncfusion-content/986912-dialog-blazor
986912: resolved Liquid syntax error
2 parents db9ab56 + 8d203cf commit 80a30d8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

blazor/chat-ui/bot-integrations/integration-with-bot-dialogflow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: post
33
title: Google Dialogflow with Blazor Chat UI Component | Syncfusion
4-
description: Checkout and learn here all about Integrate Microsoft Bot Framework with Syncfusion Blazor Chat UI component in Blazor Server App and Blazor WebAssembly App.
4+
description: Checkout and learn here all about Integrate Google Dialogflow with Syncfusion Blazor Chat UI component in Blazor Server App and Blazor WebAssembly App.
55
platform: Blazor
66
control: Chat UI
77
documentation: ug

blazor/chat-ui/bot-integrations/integration-with-bot-framework.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Use the `MessageSend`event of the `SfChatUI` component to handle message exchang
125125
Create or modify a Razor component (e.g., `Pages/Chat.razor`) to integrate the Syncfusion Chat UI with the Direct Line API:
126126

127127
{% tabs %}
128-
{% highlight razor %}
128+
{% highlight cshtml %}
129129

130130
@using Syncfusion.Blazor.InteractiveChat
131131
@using Syncfusion.Blazor
@@ -172,7 +172,7 @@ Create or modify a Razor component (e.g., `Pages/Chat.razor`) to integrate the S
172172

173173
// Use JSInterop to initialize Direct Line (client-side for real-time updates)
174174
var directLine = await JS.InvokeAsync<IJSObjectReference>("eval",
175-
$"new BotFramework.DirectLine.DirectLine({{ token: '{data.token}' }})");
175+
`new BotFramework.DirectLine.DirectLine({ token: '${data.token}' })`);
176176

177177
isConnected = true;
178178

@@ -181,14 +181,14 @@ Create or modify a Razor component (e.g., `Pages/Chat.razor`) to integrate the S
181181
}
182182
catch (Exception ex)
183183
{
184-
await ChatUI.AddMessageAsync(new ChatMessage { Text = "Sorry, I couldnt connect to the bot.", Author = BotUserModel });
184+
await ChatUI.AddMessageAsync(new ChatMessage { Text = "Sorry, I couldn't connect to the bot.", Author = BotUserModel });
185185
Console.WriteLine($"Connection error: {ex.Message}");
186186
return;
187187
}
188188
}
189189

190190
// Send message to bot via JSInterop
191-
await JS.InvokeVoidAsync("sendToBot", /* directLine ref or global */, args.Message.Text, currentUserId);
191+
await JS.InvokeVoidAsync("sendToBot", directLine, args.Message.Text, currentUserId);
192192
args.Cancel = true; // Prevent default send
193193
}
194194

0 commit comments

Comments
 (0)