@webex/plugin-meetings 3.12.0-next.59 → 3.12.0-next.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ import { DESTINATION_TYPE, NETWORK_STATUS } from '../constants';
16
16
  import { ReceiveSlotManager } from '../multistream/receiveSlotManager';
17
17
  import { MediaRequestManager } from '../multistream/mediaRequestManager';
18
18
  import { Configuration as RemoteMediaManagerConfiguration, RemoteMediaManager } from '../multistream/remoteMediaManager';
19
- import { ReactionServerType, SkinToneType } from '../reactions/reactions.type';
19
+ import { SkinToneType } from '../reactions/reactions.type';
20
20
  import InMeetingActions from './in-meeting-actions';
21
21
  import RecordingController from '../recording-controller';
22
22
  import ControlsOptionsManager from '../controls-options-manager';
@@ -2053,7 +2053,7 @@ export default class Meeting extends StatelessWebexPlugin {
2053
2053
  * @public
2054
2054
  * @memberof Meeting
2055
2055
  */
2056
- sendReaction(reactionType: ReactionServerType, skinToneType?: SkinToneType): any;
2056
+ sendReaction(reactionType: string, skinToneType?: SkinToneType): any;
2057
2057
  /**
2058
2058
  * Extend the current meeting duration.
2059
2059
  *
@@ -774,7 +774,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
774
774
  }, _callee1);
775
775
  }))();
776
776
  },
777
- version: "3.12.0-next.59"
777
+ version: "3.12.0-next.60"
778
778
  });
779
779
  var _default = exports.default = Webinar;
780
780
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -94,5 +94,5 @@
94
94
  "//": [
95
95
  "TODO: upgrade jwt-decode when moving to node 18"
96
96
  ],
97
- "version": "3.12.0-next.59"
97
+ "version": "3.12.0-next.60"
98
98
  }
@@ -10081,15 +10081,12 @@ export default class Meeting extends StatelessWebexPlugin {
10081
10081
  * @public
10082
10082
  * @memberof Meeting
10083
10083
  */
10084
- public sendReaction(reactionType: ReactionServerType, skinToneType?: SkinToneType) {
10084
+ public sendReaction(reactionType: string, skinToneType?: SkinToneType) {
10085
10085
  const reactionChannelUrl = this.locusInfo?.controls?.reactions?.reactionChannelUrl as string;
10086
10086
  const participantId = this.members.selfId;
10087
10087
 
10088
- const reactionData = Reactions[reactionType];
10088
+ const reactionData = Reactions[reactionType] || {type: reactionType};
10089
10089
 
10090
- if (!reactionData) {
10091
- return Promise.reject(new Error(`${reactionType} is not a valid reaction.`));
10092
- }
10093
10090
  const skinToneData = SkinTones[skinToneType] || SkinTones.normal;
10094
10091
  const reaction: Reaction = {
10095
10092
  ...reactionData,
@@ -16070,16 +16070,25 @@ describe('plugin-meetings', () => {
16070
16070
  assert.notCalled(meeting.meetingRequest.sendReaction);
16071
16071
  });
16072
16072
 
16073
- it('should fail sending a reaction if reactionType is invalid ', async () => {
16073
+ it('should send a custom reaction type not in the known list', async () => {
16074
16074
  meeting.locusInfo.controls = {reactions: {reactionChannelUrl: 'Fake URL'}};
16075
16075
 
16076
- await assert.isRejected(
16077
- meeting.sendReaction('invalid_reaction', 'light'),
16078
- Error,
16079
- 'invalid_reaction is not a valid reaction.'
16080
- );
16076
+ const reactionPromise = meeting.sendReaction('custom_reaction', 'light');
16081
16077
 
16082
- assert.notCalled(meeting.meetingRequest.sendReaction);
16078
+ assert.exists(reactionPromise.then);
16079
+ await reactionPromise;
16080
+ assert.calledOnceWithExactly(meeting.meetingRequest.sendReaction, {
16081
+ reactionChannelUrl: 'Fake URL',
16082
+ reaction: {
16083
+ type: 'custom_reaction',
16084
+ tone: {
16085
+ type: 'light_skin_tone',
16086
+ codepoints: '1F3FB',
16087
+ shortcodes: ':skin-tone-2:',
16088
+ },
16089
+ },
16090
+ participantId: meeting.members.selfId,
16091
+ });
16083
16092
  });
16084
16093
 
16085
16094
  it('should send a reaction with default skin tone if provided skinToneType is invalid ', async () => {