Skip to content

Commit cff0f0b

Browse files
authored
Merge pull request #25356 from microsoftgraph/users/sumanac/customemojicustomreaction
Doc update for custom emoji and reaction in v1.0
2 parents 0693c2e + 0f6169f commit cff0f0b

File tree

7 files changed

+154
-8
lines changed

7 files changed

+154
-8
lines changed

api-reference/beta/api/chatmessage-get.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ Content-type: application/json
493493
},
494494
"body": {
495495
"contentType": "html",
496-
"content": "<p>I am looking&nbsp;<emoji id=\"1f440_eyes\" alt=\"👀\" title=\"Eyes\"></emoji><customemoji id=\"dGVzdHNjOzAtd3VzLWQyLTdiNWRkZGQ2ZGVjMDNkYzIwNTgxY2NkYTE1MmEyZTM4\" alt=\"testsc\" source=\"https://graph.microsoft.com/beta/chats/19:bcf84b15c2994a909770f7d05bc4fe16@thread.v2/messages/1706638496169/hostedContents/aWQ9LHR5cGU9MSx1cmw9aHR0cHM6Ly91cy1jYW5hcnkuYXN5bmNndy50ZWFtcy5taWNyb3NvZnQuY29tL3YxL29iamVjdHMvMC13dXMtZDItN2I1ZGRkZDZkZWMwM2RjMjA1ODFjY2RhMTUyYTJlMzgvdmlld3MvaW1ndDJfYW5pbQ==/$value\"></customemoji></p>"
496+
"content": "<p>I am looking&nbsp;<emoji id=\"1f440_eyes\" alt=\"👀\" title=\"Eyes\"></emoji><customemoji id=\"dGVzdHNjOzAtd3VzLWQyLTdiNWRkZGQ2ZGVjMDNkYzIwNTgxY2NkYTE1MmEyZTM4\" alt=\"microsoft_teams\" source=\"https://graph.microsoft.com/beta/chats/19:bcf84b15c2994a909770f7d05bc4fe16@thread.v2/messages/1706638496169/hostedContents/aWQ9LHR5cGU9MSx1cmw9aHR0cHM6Ly91cy1jYW5hcnkuYXN5bmNndy50ZWFtcy5taWNyb3NvZnQuY29tL3YxL29iamVjdHMvMC13dXMtZDItN2I1ZGRkZDZkZWMwM2RjMjA1ODFjY2RhMTUyYTJlMzgvdmlld3MvaW1ndDJfYW5pbQ==/$value\"></customemoji></p>"
497497
},
498498
"attachments": [],
499499
"mentions": [],

api-reference/beta/resources/chatmessagereaction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ The following JSON representation shows the resource type.
4343
```json
4444
{
4545
"createdDateTime": "String (timestamp)",
46-
"reactionContentUrl": "String",
4746
"displayName": "String",
47+
"reactionContentUrl": "String",
4848
"reactionType": "String",
4949
"user": {"@odata.type": "microsoft.graph.chatMessageReactionIdentitySet"}
5050
}

api-reference/v1.0/api/chatmessage-get.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,111 @@ Content-type: application/json
390390
}
391391
```
392392

393+
### Example 4: Get a chat message with custom emojis and reactions
394+
395+
The following example shows a request to get a chat message that contains custom emojis in the message body and includes custom reactions.
396+
397+
#### Request
398+
399+
The following example shows a request.
400+
401+
<!-- {
402+
"blockType": "request",
403+
"name": "get_chatmessage_4",
404+
"sampleKeys": ["19:bcf84b15c2994a909770f7d05bc4fe16@thread.v2", "1706763669648"]
405+
}-->
406+
```msgraph-interactive
407+
GET https://graph.microsoft.com/v1.0/chats/19:bcf84b15c2994a909770f7d05bc4fe16@thread.v2/messages/1706763669648
408+
```
409+
410+
#### Response
411+
412+
The following example shows the response. The message body contains a `<customemoji></customemoji>` tag, and the message includes a custom reaction indicated by `"reactionType": "custom"`. You can access both custom emojis and reactions as content hosted within a chat message.
413+
414+
<!-- {
415+
"blockType": "response",
416+
"truncated": true,
417+
"@odata.type": "microsoft.graph.chatMessage"
418+
} -->
419+
420+
```http
421+
HTTP/1.1 200 OK
422+
Content-type: application/json
423+
424+
{
425+
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3Abcf84b15c2994a909770f7d05bc4fe16%40thread.v2')/messages/$entity",
426+
"id": "1706763669648",
427+
"replyToId": null,
428+
"etag": "1707948456260",
429+
"messageType": "message",
430+
"createdDateTime": "2024-02-01T05:01:09.648Z",
431+
"lastModifiedDateTime": "2024-02-14T22:07:36.26Z",
432+
"lastEditedDateTime": null,
433+
"deletedDateTime": null,
434+
"subject": null,
435+
"summary": null,
436+
"chatId": "19:bcf84b15c2994a909770f7d05bc4fe16@thread.v2",
437+
"importance": "normal",
438+
"locale": "en-us",
439+
"webUrl": null,
440+
"channelIdentity": null,
441+
"onBehalfOf": null,
442+
"policyViolation": null,
443+
"eventDetail": null,
444+
"from": {
445+
"application": null,
446+
"device": null,
447+
"user": {
448+
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
449+
"id": "670374fa-3b0e-4a3b-9d33-0e1bc5ff1956",
450+
"displayName": "Adele Vance",
451+
"userIdentityType": "aadUser",
452+
"tenantId": "2432b57b-0abd-43db-aa7b-16eadd115d34"
453+
}
454+
},
455+
"body": {
456+
"contentType": "html",
457+
"content": "<p>I am looking&nbsp;<emoji id=\"1f440_eyes\" alt=\"👀\" title=\"Eyes\"></emoji><customemoji id=\"dGVzdHNjOzAtd3VzLWQyLTdiNWRkZGQ2ZGVjMDNkYzIwNTgxY2NkYTE1MmEyZTM4\" alt=\"microsoft_teams\" source=\"https://graph.microsoft.com/v1.0/chats/19:bcf84b15c2994a909770f7d05bc4fe16@thread.v2/messages/1706638496169/hostedContents/aWQ9LHR5cGU9MSx1cmw9aHR0cHM6Ly91cy1jYW5hcnkuYXN5bmNndy50ZWFtcy5taWNyb3NvZnQuY29tL3YxL29iamVjdHMvMC13dXMtZDItN2I1ZGRkZDZkZWMwM2RjMjA1ODFjY2RhMTUyYTJlMzgvdmlld3MvaW1ndDJfYW5pbQ==/$value\"></customemoji></p>"
458+
},
459+
"attachments": [],
460+
"mentions": [],
461+
"reactions": [
462+
{
463+
"reactionType": "💯",
464+
"displayName": "Hundred points",
465+
"reactionContentUrl": null,
466+
"createdDateTime": "2024-02-14T22:07:36.3Z",
467+
"user": {
468+
"application": null,
469+
"device": null,
470+
"user": {
471+
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
472+
"id": "670374fa-3b0e-4a3b-9d33-0e1bc5ff1956",
473+
"displayName": null,
474+
"userIdentityType": "aadUser"
475+
}
476+
}
477+
},
478+
{
479+
"reactionType": "custom",
480+
"displayName": "microsoft_teams",
481+
"reactionContentUrl": "https://graph.microsoft.com/v1.0/chats/19:bcf84b15c2994a909770f7d05bc4fe16@thread.v2/messages/1706763669648/hostedContents/aWQ9MC13dXMtZDExLTc3ZmI2NmY4MTMwMGI2OGEzYzRkOWUyNmU1YTc5ZmMyLHR5cGU9MSx1cmw9/$value",
482+
"createdDateTime": "2024-02-14T22:07:02.288Z",
483+
"user": {
484+
"application": null,
485+
"device": null,
486+
"user": {
487+
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
488+
"id": "28c10244-4bad-4fda-993c-f332faef94f0",
489+
"displayName": null,
490+
"userIdentityType": "aadUser"
491+
}
492+
}
493+
}
494+
]
495+
}
496+
```
497+
393498
## Related content
394499

395500
- [List messages in a channel](channel-list-messages.md)

api-reference/v1.0/resources/chatmessagereaction.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,10 @@ An entity of type `chatMessageReaction` is returned as part of the [Get channel
1919

2020
| Property | Type | Description |
2121
|:-------------|:------------|:------------|
22-
|createdDateTime|DateTimeOffset|The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is `2014-01-01T00:00:00Z`|
23-
|reactionType|String|Supported values are `like`, `angry`, `sad`, `laugh`, `heart`, `surprised`. |
22+
|createdDateTime|DateTimeOffset|The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2014 is `2014-01-01T00:00:00Z`.|
23+
|displayName|String|The name of the reaction.|
24+
|reactionContentUrl|String|The hosted content URL for the custom reaction type. |
25+
|reactionType|String|The reaction type. Supported values include Unicode characters, `custom`, and some backward-compatible reaction types, such as `like`, `angry`, `sad`, `laugh`, `heart`, and `surprised`. |
2426
|user|[chatMessageReactionIdentitySet](chatmessagereactionidentityset.md)|The user who reacted to the message.|
2527

2628
## JSON representation
@@ -39,6 +41,8 @@ The following JSON representation shows the resource type.
3941
```json
4042
{
4143
"createdDateTime": "String (timestamp)",
44+
"displayName": "String",
45+
"reactionContentUrl": "String",
4246
"reactionType": "String",
4347
"user": {"@odata.type": "microsoft.graph.chatMessageReactionIdentitySet"}
4448
}

changelog/Microsoft.Teams.Core.json

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5617,7 +5617,7 @@
56175617
"ApiChange": "Property",
56185618
"ChangedApiName": "displayName",
56195619
"ChangeType": "Addition",
5620-
"Description": "Added the **displayName** property to the [chatMessageReaction](https://learn.microsoft.com/en-us/graph/api/resources/chatmessagereaction?view=graph-rest-beta) resource to represent the reaction name [chatMessage](https://learn.microsoft.com/en-us/graph/api/resources/chatmessage?view=graph-rest-beta).",
5620+
"Description": "Added the **displayName** property to the [chatMessageReaction](https://learn.microsoft.com/en-us/graph/api/resources/chatmessagereaction?view=graph-rest-beta) resource to represent the reaction name in a [chatMessage](https://learn.microsoft.com/en-us/graph/api/resources/chatmessage?view=graph-rest-beta).",
56215621
"Target": "chatMessageReaction"
56225622
}
56235623
],
@@ -5647,7 +5647,7 @@
56475647
"SubArea": "Messaging"
56485648
},
56495649
{
5650-
"ChangeList": [
5650+
"ChangeList": [
56515651
{
56525652
"Id": "3a5a736c-80cd-4f40-b4dc-d3c3a6ea14c0",
56535653
"ApiChange": "Property",
@@ -5663,6 +5663,40 @@
56635663
"CreatedDateTime": "2024-10-22T18:15:55.2254479Z",
56645664
"WorkloadArea": "Teamwork and communications",
56655665
"SubArea": "Messaging"
5666+
},
5667+
{
5668+
"ChangeList": [
5669+
{
5670+
"Id": "aae970a0-f381-40f7-bf96-fea7f489e08a",
5671+
"ApiChange": "Property",
5672+
"ChangedApiName": "reactionContentUrl",
5673+
"ChangeType": "Addition",
5674+
"Description": "Added the **reactionContentUrl** property to the [chatMessageReaction](https://learn.microsoft.com/en-us/graph/api/resources/chatmessagereaction?view=graph-rest-1.0) resource to represent the hosted content URL for a custom reaction in a [chatMessage](https://learn.microsoft.com/en-us/graph/api/resources/chatmessage?view=graph-rest-1.0).",
5675+
"Target": "chatMessageReaction"
5676+
},
5677+
{
5678+
"Id": "aae970a0-f381-40f7-bf96-fea7f489e08a",
5679+
"ApiChange": "Property",
5680+
"ChangedApiName": "displayName",
5681+
"ChangeType": "Addition",
5682+
"Description": "Added the **displayName** property to the [chatMessageReaction](https://learn.microsoft.com/en-us/graph/api/resources/chatmessagereaction?view=graph-rest-1.0) resource to represent the reaction name in a [chatMessage](https://learn.microsoft.com/en-us/graph/api/resources/chatmessage?view=graph-rest-1.0).",
5683+
"Target": "chatMessageReaction"
5684+
},
5685+
{
5686+
"Id": "aae970a0-f381-40f7-bf96-fea7f489e08a",
5687+
"ApiChange": "Property",
5688+
"ChangedApiName": "content",
5689+
"ChangeType": "Change",
5690+
"Description": "Added new `<customemoji></customemoji>` tag support to the message body **content** of the [itemBody](https://learn.microsoft.com/graph/api/resources/itembody?view=graph-rest-1.0) resource to represent custom emojis in the message body in a [chatMessage](https://learn.microsoft.com/en-us/graph/api/resources/chatmessage?view=graph-rest-1.0). This change shows up in the actual **content** property of the message body when you [get a chat message in a channel or chat](https://learn.microsoft.com/en-us/graph/api/chatmessage-get?view=graph-rest-1.0).",
5691+
"Target": "itemBody"
5692+
}
5693+
],
5694+
"Id": "aae970a0-f381-40f7-bf96-fea7f489e08a",
5695+
"Cloud": "Prod",
5696+
"Version": "v1.0",
5697+
"CreatedDateTime": "2024-10-24T18:15:55.2254479Z",
5698+
"WorkloadArea": "Teamwork and communications",
5699+
"SubArea": "Messaging"
56665700
}
56675701
]
56685702
}

concepts/teams-messaging-overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ The **chatMessage** schema supports the following non-HTML elements that Teams a
181181
- id - The ID of the emoji.
182182
- alt - An alternate representation for the emoji; for example, Unicode.
183183
- title - A title for the emoji.
184-
- customemoji - When the body of the message contains a custom emoji, the `$"<customemoji id=\"dGVzdHNjOzAtd3VzLWQyLTdiNWRkZGQ2ZGVjMDNkYzIwNTgxY2NkYTE1MmEyZTM4\" alt=\"testsc\" source=\"https://graph.microsoft.com/beta/chats/19:bcf84b15c2994a909770f7d05bc4fe16@thread.v2/messages/1706638496169/hostedContents/aWQ9LHR5cGU9MSx1cmw9aHR0cHM6Ly91cy1jYW5hcnkuYXN5bmNndy50ZWFtcy5taWNyb3NvZnQuY29tL3YxL29iamVjdHMvMC13dXMtZDItN2I1ZGRkZDZkZWMwM2RjMjA1ODFjY2RhMTUyYTJlMzgvdmlld3MvaW1ndDJfYW5pbQ==/$value\"></customemoji>"` element represents the properties of a *customemoji*:
184+
- customemoji - When the body of the message contains a custom emoji, the `$"<customemoji id="IdOfTheCustomEmoji" alt="AlternateRepresentationOfCustomEmoji" source="HostedContentOfCustomEmoji"></customemoji>"` element represents the properties of a *customemoji*:
185185
- id - The ID of the custom emoji.
186186
- alt - An alternate representation for the custom emoji; for example, the name of the custom emoji.
187187
- source - The hosted content of the custom emoji associated with the message.

concepts/whats-new-overview.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ Use the **isDeltaRosterEnabled** property on [incomingCallOptions](/graph/api/re
4646

4747
### Teamwork and communications | Messaging
4848

49-
Updated the [chatMessage: delta](/graph/api/chatmessage-delta) method to use a new endpoint that gets the list of delta messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats.
49+
- Updated the [chatMessage: delta](/graph/api/chatmessage-delta) method to use a new endpoint that gets the list of delta messages from all chats in which a user is a participant, including one-on-one chats, group chats, and meeting chats.
50+
- Use the **reactionContentUrl** property on [chatMessageReaction](/graph/api/resources/chatmessagereaction) to represent the hosted content URL for a custom reaction in a [chatMessage](/graph/api/resources/chatmessage).
51+
- Use the `<customemoji></customemoji>` tag on the **content** property of the [itemBody](/graph/api/resources/itembody) resource to represent custom emojis in the message body in a [chatMessage](/graph/api/resources/chatmessage).
52+
- Use the **displayName** property on [chatMessageReaction](/graph/api/resources/chatmessagereaction) to represent the reaction name in a [chatMessage](/graph/api/resources/chatmessage).
5053

5154
## October 2024: New in preview only
5255

0 commit comments

Comments
 (0)