Skip to content

Commit b1f1f3f

Browse files
Merge pull request #253871 from sloanster/patch-38
Update manage-calls-web.md
2 parents f0027b5 + 535216f commit b1f1f3f

File tree

1 file changed

+55
-0
lines changed
  • articles/communication-services/how-tos/cte-calling-sdk/includes/manage-calls

1 file changed

+55
-0
lines changed

articles/communication-services/how-tos/cte-calling-sdk/includes/manage-calls/manage-calls-web.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,3 +316,58 @@ Recommendations for the management of chat ID:
316316
- Escalation of the 1:1 phone call by adding another phone participant: Use Graph API to get the existing chat ID with only Teams user as a participant or create a new group chat with participants: Teams user ID and "00000000-0000-0000-0000-000000000000"
317317
- Group call with single Teams user and multiple phone participants: Use Graph API to get existing chat ID with only Teams user as a participant or create a new group chat with participants: Teams user ID and "00000000-0000-0000-0000-000000000000"
318318
- Group call with more than 2 Teams users: Use Graph API to get or create a group chat with the Teams users
319+
320+
## Send or receive a reaction from other participants
321+
> [!NOTE]
322+
> This API is provided as a preview for developers and may change based on feedback that we receive. To use this api please use 'beta' release of Azure Communication Services Calling Web SDK version 1.18.1 or higher
323+
324+
Within ACS you can send and receive reactions when on a group call:
325+
- Like :+1:
326+
- Love :heart:
327+
- Applause :clap:
328+
- Laugh :smile:
329+
- Surprise :open_mouth:
330+
331+
To send a reaction you'll use the `sendReaction(reactionMessage)` API. To receive a reaction message will be built with Type `ReactionMessage` which uses `Reaction` enums as an attribute.
332+
333+
You'll need to subscribe for events which provide the subscriber event data as:
334+
```javascript
335+
export interface ReactionEventPayload {
336+
/**
337+
* identifier for a participant
338+
*/
339+
identifier: CommunicationUserIdentifier | MicrosoftTeamsUserIdentifier;
340+
/**
341+
* reaction type received
342+
*/
343+
reactionMessage: ReactionMessage;
344+
}
345+
```
346+
347+
You can determine which reaction is coming from which participant with `identifier` attribute and gets the reaction type from `ReactionMessage`.
348+
349+
### Sample on how to send a reaction in a meeting
350+
```javascript
351+
const reaction = call.feature(SDK.Features.Reaction);
352+
const reactionMessage: SDK.ReactionMessage = {
353+
reactionType: 'like'
354+
};
355+
await reaction.sendReaction(reactionMessage);
356+
```
357+
358+
### Sample on how to receive a reaction in a meeting
359+
```javascript
360+
const reaction = call.feature(SDK.Features.Reaction);
361+
reaction.on('reaction', event => {
362+
// user identifier
363+
console.log("User Mri - " + event.identifier);
364+
// received reaction
365+
console.log("User Mri - " + event.reactionMessage.name);
366+
// reaction message
367+
console.log("reaction message - " + JSON.stringify(event.reactionMessage));
368+
}
369+
```
370+
371+
### Key things to note about using Reactions:
372+
- Reactions won't work if the meeting organizer updates the meeting policy to disallow the reaction in a Teams interop call.
373+
- Sending of reactions doesn't work on 1:1 calls.

0 commit comments

Comments
 (0)