UNPKG

@azure/communication-react

Version:

React library for building modern communication user experiences utilizing Azure Communication Services

24 lines 835 B
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. /** * @private */ export class ReactionSubscriber { constructor(callIdRef, context, reaction) { this.subscribe = () => { this._reaction.on('reaction', this.onReactionEvent); }; this.unsubscribe = () => { this._reaction.off('reaction', this.onReactionEvent); }; //eslint-disable-next-line @typescript-eslint/no-explicit-any this.onReactionEvent = (event) => { this._context.setReceivedReactionFromParticipant(this._callIdRef.callId, event.identifier, event.reactionMessage); }; this._callIdRef = callIdRef; this._context = context; this._reaction = reaction; this.subscribe(); } } //# sourceMappingURL=ReactionSubscriber.js.map