Skip to content

Commit 38cabb0

Browse files
committed
edits
1 parent 1d175a4 commit 38cabb0

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

articles/communication-services/quickstarts/chat/quickstart-botframework-integration.md

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ ChatThreadClient chatThreadClient = chatClient.GetChatThreadClient(threadId: thr
237237

238238
### Send a message to a chat thread
239239

240-
Use `SendMessage` to send a message to a thread.
240+
Use `SendMessage` to send a message to a thread:
241241

242242
```csharp
243243
SendChatMessageOptions sendChatMessageOptions = new SendChatMessageOptions()
@@ -253,7 +253,7 @@ string messageId = sendChatMessageResult.Id;
253253

254254
### Receive chat messages from a chat thread
255255

256-
You can retrieve chat messages by polling the `GetMessages` method on the chat thread client at specified intervals:
256+
You can get chat messages by polling the `GetMessages` method on the chat thread client at specified intervals:
257257

258258
```csharp
259259
AsyncPageable<ChatMessage> allMessages = chatThreadClient.GetMessagesAsync();
@@ -263,22 +263,23 @@ await foreach (ChatMessage message in allMessages)
263263
}
264264
```
265265

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:
268269

269270
```javascript
270-
// open notifications channel
271+
// Open notifications channel
271272
await chatClient.startRealtimeNotifications();
272-
// subscribe to new notification
273+
// Subscribe to new notifications
273274
chatClient.on("chatMessageReceived", (e) => {
274275
console.log("Notification chatMessageReceived!");
275-
// your code here
276+
// Your code here
276277
});
277278
```
278279

279280
### Clean up the chat thread
280281

281-
Delete the thread when finished.
282+
When you're finished using the chat thread, delete the thread:
282283

283284
```csharp
284285
chatClient.DeleteChatThread(threadId);
@@ -289,13 +290,14 @@ chatClient.DeleteChatThread(threadId);
289290
To deploy the chat application:
290291

291292
1. In Visual Studio, open the chat project.
293+
292294
1. Right-click the **ChatQuickstart** project and select **Publish**:
293295

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.":::
295297

296298
## More things you can do with a bot
297299

298-
In addition to sending a plain text 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
299301

300302
- Conversation update
301303
- Message update
@@ -443,7 +445,7 @@ Event payload comprises all JSON fields in the message content except `Name`, w
443445
}
444446
```
445447

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.
447449

448450
## Supported bot activity fields
449451

@@ -494,6 +496,7 @@ The metadata field `"microsoft.azure.communication.chat.bot.contenttype"` is onl
494496

495497
- `Name`
496498
- `Value`
499+
497500
- Typing activity
498501

499502
#### Other common fields
@@ -520,13 +523,15 @@ There may be certain use cases where two bots need to be added to the same chat
520523

521524
## Troubleshoot
522525

526+
The following sections describe ways to troubleshoot common scenarios.
527+
523528
### Chat channel can't be added
524529

525530
In the Azure Bot Framework portal, go to **Configuration** > **Bot Messaging** to verify that the endpoint has been set correctly.
526531

527532
### Bot gets a forbidden exception while replying to a message
528533

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.
530535

531536
### Bot can't be added as a participant
532537

0 commit comments

Comments
 (0)