Skip to content

Commit 071c362

Browse files
authored
Merge pull request #2035 from MicrosoftDocs/kaiqb/r8-fix
Update snippet-channeldata.md
2 parents 4ec4a1f + 9200445 commit 071c362

File tree

1 file changed

+84
-27
lines changed

1 file changed

+84
-27
lines changed

articles/includes/snippet-channeldata.md

Lines changed: 84 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ Some channels provide features that cannot be implemented by using only message
22

33
This article describes how to use a message activity's channel data property to implement this channel-specific functionality:
44

5-
| Channel | Functionality |
6-
|----|----|
7-
| Email | Send and receive an email that contains body, subject, and importance metadata |
8-
| Slack | Send full fidelity Slack messages |
9-
| Facebook | Send Facebook notifications natively |
10-
| Telegram | Perform Telegram-specific actions, such as sharing a voice memo or a sticker |
11-
| Kik | Send and receive native Kik messages |
5+
| Channel | Functionality |
6+
| -------- | ------------------------------------------------------------------------------ |
7+
| Email | Send and receive an email that contains body, subject, and importance metadata |
8+
| Slack | Send full fidelity Slack messages |
9+
| Facebook | Send Facebook notifications natively |
10+
| Telegram | Perform Telegram-specific actions, such as sharing a voice memo or a sticker |
11+
| Kik | Send and receive native Kik messages |
1212

1313
> [!NOTE]
1414
> The value of an activity object's channel data property is a JSON object.
@@ -21,14 +21,14 @@ This article describes how to use a message activity's channel data property to
2121
To create an email message, set the activity object's channel data property
2222
to a JSON object that contains these properties:
2323

24-
| Property | Description |
25-
|----|----|
26-
| bccRecipients | A semicolon (;) delimited string of email addresses to add to the message's Bcc (blind carbon copy) field. |
27-
| ccRecipients | A semicolon (;) delimited string of email addresses to add to the message's Cc (carbon copy) field. |
28-
| htmlBody | An HTML document that specifies the body of the email message. See the channel's documentation for information about supported HTML elements and attributes. |
29-
| importance | The email's importance level. Valid values are **high**, **normal**, and **low**. The default value is **normal**. |
30-
| subject | The email's subject. See the channel's documentation for information about field requirements. |
31-
| toRecipients | A semicolon (;) delimited string of email addresses to add to the message's To field. |
24+
| Property | Description |
25+
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
26+
| bccRecipients | A semicolon (;) delimited string of email addresses to add to the message's Bcc (blind carbon copy) field. |
27+
| ccRecipients | A semicolon (;) delimited string of email addresses to add to the message's Cc (carbon copy) field. |
28+
| htmlBody | An HTML document that specifies the body of the email message. See the channel's documentation for information about supported HTML elements and attributes. |
29+
| importance | The email's importance level. Valid values are **high**, **normal**, and **low**. The default value is **normal**. |
30+
| subject | The email's subject. See the channel's documentation for information about field requirements. |
31+
| toRecipients | A semicolon (;) delimited string of email addresses to add to the message's To field. |
3232

3333
> [!NOTE]
3434
> Messages that your bot receives from users via the Email channel may
@@ -255,10 +255,10 @@ To create interactive menus, use the following JSON:
255255
To create a Facebook notification,
256256
set the activity object's channel data property to a JSON object that specifies these properties:
257257

258-
| Property | Description |
259-
|----|----|
260-
| notification_type | The type of notification (e.g., **REGULAR**, **SILENT_PUSH**, **NO_PUSH**).
261-
| attachment | An attachment that specifies an image, video, or other multimedia type, or a templated attachment such as a receipt. |
258+
| Property | Description |
259+
| ----------------- | -------------------------------------------------------------------------------------------------------------------- |
260+
| notification_type | The type of notification (e.g., **REGULAR**, **SILENT_PUSH**, **NO_PUSH**). |
261+
| attachment | An attachment that specifies an image, video, or other multimedia type, or a templated attachment such as a receipt. |
262262

263263
> [!NOTE]
264264
> For details about format and contents of the `notification_type` property and `attachment` property, see the
@@ -285,9 +285,9 @@ To create a message that implements Telegram-specific actions,
285285
such as sharing a voice memo or a sticker,
286286
set the activity object's channel data property to a JSON object that specifies these properties:
287287

288-
| Property | Description |
289-
|----|----|
290-
| method | The Telegram Bot API method to call. |
288+
| Property | Description |
289+
| ---------- | --------------------------------------- |
290+
| method | The Telegram Bot API method to call. |
291291
| parameters | The parameters of the specified method. |
292292

293293
These Telegram methods are supported:
@@ -356,12 +356,69 @@ This snippet shows an example of a `channelData` property that specifies an arra
356356
]
357357
```
358358

359+
When a Telegram method is implemented, your bot will receive a response message
360+
in which the channel data property is populated with a JSON object. This response object specifies
361+
the contents of the original message, including an `update_id` and, at most, one optional
362+
parameter. For information about receiving incoming responses, see
363+
<a href="https://core.telegram.org/bots/api#getting-updates" target="_blank">Getting updates</a>.
364+
365+
This snippet shows an example of the `channelData` property in the message that a bot receives
366+
when a poll is created.
367+
368+
```json
369+
"channelData": {
370+
"update_id": 43517575,
371+
"message": {
372+
"message_id": 618,
373+
"from": {
374+
"id": 803613355,
375+
"is_bot": false,
376+
"first_name": "Joe",
377+
"last_name": "Doe",
378+
"username": "jdoe",
379+
"language_code": "en"
380+
},
381+
"chat": {
382+
"id": 803613355,
383+
"first_name": "Joe",
384+
"last_name": "Doe",
385+
"username": "jdoe",
386+
"type": "private"
387+
},
388+
"date": 1582577834,
389+
"poll": {
390+
"id": "5089525250643722242",
391+
"question": "How to win?",
392+
"options": [
393+
{
394+
"text": "Be the best",
395+
"voter_count": 0
396+
},
397+
{
398+
"text": "Help those in need",
399+
"voter_count": 0
400+
},
401+
{
402+
"text": "All of the above",
403+
"voter_count": 0
404+
}
405+
],
406+
"total_voter_count": 0,
407+
"is_closed": false,
408+
"is_anonymous": true,
409+
"type": "regular",
410+
"allows_multiple_answers": false
411+
}
412+
}
413+
}
414+
```
415+
359416
## Create a native Kik message
360417

361418
To create a native Kik message, set the activity object's channel data property to a JSON object that specifies this property:
362419

363-
| Property | Description |
364-
|----|----|
420+
| Property | Description |
421+
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
365422
| messages | An array of Kik messages. For details about Kik message format, see <a href="https://dev.kik.com/#/docs/messaging#message-formats" target="_blank">Kik Message Formats</a>. |
366423

367424
This snippet shows an example of the `channelData` property for a native Kik message.
@@ -394,9 +451,9 @@ This snippet shows an example of the `channelData` property for a native Kik mes
394451

395452
To create a message that implements LINE-specific message types (such as sticker, templates, or LINE specific action types like opening the phone camera), set the activity object's channel data property to a JSON object that specifies LINE message types and action types.
396453

397-
| Property | Description |
398-
|----|----|
399-
| type | The LINE action/message type name |
454+
| Property | Description |
455+
| -------- | --------------------------------- |
456+
| type | The LINE action/message type name |
400457

401458
These LINE message types are supported:
402459
* Sticker

0 commit comments

Comments
 (0)