You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -263,22 +263,23 @@ await foreach (ChatMessage message in allMessages)
263
263
}
264
264
```
265
265
266
-
You should see bot's echo reply to "Hello World" in the list of messages.
267
-
When creating the chat applications, you can also receive real-time notifications by subscribing to listen for new incoming messages using our JavaScript or mobile SDKs. An example using JavaScript SDK would be:
266
+
Check the list of messages for the bot's echo reply to "Hello World".
267
+
268
+
You can use JavaScript or the Azure mobile SDKs to subscribe to incoming message notifications:
268
269
269
270
```javascript
270
-
//open notifications channel
271
+
//Open notifications channel
271
272
awaitchatClient.startRealtimeNotifications();
272
-
//subscribe to new notification
273
+
//Subscribe to new notifications
273
274
chatClient.on("chatMessageReceived", (e) => {
274
275
console.log("Notification chatMessageReceived!");
275
-
//your code here
276
+
//Your code here
276
277
});
277
278
```
278
279
279
280
### Clean up the chat thread
280
281
281
-
Delete the thread when finished.
282
+
When you're finished using the chat thread, delete the thread:
1. Right-click the **ChatQuickstart** project and select **Publish**:
293
295
294
-
:::image type="content" source="./media/deploy-chat-application.png" alt-text="Screenshot of deploying the chat application to Azure from Visual Studio.":::
296
+
:::image type="content" source="./media/deploy-chat-application.png" alt-text="Screenshot that shows deploying the chat application to Azure from Visual Studio.":::
295
297
296
298
## More things you can do with a bot
297
299
298
-
In addition to sending a plaintext message, a bot is also able to receive many other activities from the user through Azure Communications Services Chat channel including
300
+
In addition to sending a plain-text message, a bot also can receive many other activities from the user through Azure Communications Services Chat channel including
299
301
300
302
- Conversation update
301
303
- Message update
@@ -443,7 +445,7 @@ Event payload comprises all JSON fields in the message content except `Name`, w
443
445
}
444
446
```
445
447
446
-
The metadata field `"microsoft.azure.communication.chat.bot.contenttype"` is only needed in user to bot direction. It is not needed in bot to user direction.
448
+
The metadata field `"microsoft.azure.communication.chat.bot.contenttype"` is needed only in the user-to-bot direction. It's not needed in the bot-to-user direction.
447
449
448
450
## Supported bot activity fields
449
451
@@ -494,6 +496,7 @@ The metadata field `"microsoft.azure.communication.chat.bot.contenttype"` is onl
494
496
495
497
-`Name`
496
498
-`Value`
499
+
497
500
- Typing activity
498
501
499
502
#### Other common fields
@@ -520,13 +523,15 @@ There may be certain use cases where two bots need to be added to the same chat
520
523
521
524
## Troubleshoot
522
525
526
+
The following sections describe ways to troubleshoot common scenarios.
527
+
523
528
### Chat channel can't be added
524
529
525
530
In the Azure Bot Framework portal, go to **Configuration** > **Bot Messaging** to verify that the endpoint has been set correctly.
526
531
527
532
### Bot gets a forbidden exception while replying to a message
528
533
529
-
Verify that bot's Microsoft App ID and secret are saved correctly in the bot configuration file uploaded to the webapp.
534
+
Verify that bot's Microsoft App ID and password are saved correctly in the bot configuration file uploaded to the web app.
0 commit comments