@webex/internal-plugin-conversation 3.0.0-beta.32 → 3.0.0-beta.321
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.
- package/dist/conversation.js +28 -7
- package/dist/conversation.js.map +1 -1
- package/dist/encryption-transforms.js +7 -2
- package/dist/encryption-transforms.js.map +1 -1
- package/dist/share-activity.js +2 -2
- package/dist/share-activity.js.map +1 -1
- package/package.json +15 -15
- package/src/conversation.js +19 -6
- package/src/encryption-transforms.js +8 -0
- package/src/share-activity.js +1 -1
- package/test/integration/spec/create.js +2 -3
- package/test/integration/spec/encryption.js +0 -1
- package/test/integration/spec/get.js +4 -2
- package/test/unit/spec/conversation.js +41 -0
- package/test/unit/spec/encryption-transforms.js +23 -0
package/dist/conversation.js
CHANGED
|
@@ -294,10 +294,11 @@ var Conversation = _webexCore.WebexPlugin.extend({
|
|
|
294
294
|
/**
|
|
295
295
|
* delete a reaction
|
|
296
296
|
* @param {Object} conversation
|
|
297
|
-
* @param {Object} reactionId
|
|
297
|
+
* @param {Object} reactionId,
|
|
298
|
+
* @param {String} recipientId,
|
|
298
299
|
* @returns {Promise<Activity>}
|
|
299
300
|
*/
|
|
300
|
-
deleteReaction: function deleteReaction(conversation, reactionId) {
|
|
301
|
+
deleteReaction: function deleteReaction(conversation, reactionId, recipientId) {
|
|
301
302
|
var deleteReactionPayload = {
|
|
302
303
|
actor: {
|
|
303
304
|
objectType: 'person',
|
|
@@ -314,6 +315,16 @@ var Conversation = _webexCore.WebexPlugin.extend({
|
|
|
314
315
|
},
|
|
315
316
|
verb: 'delete'
|
|
316
317
|
};
|
|
318
|
+
|
|
319
|
+
// Is not required for the request to be accepted, but follows specification.
|
|
320
|
+
if (recipientId) {
|
|
321
|
+
deleteReactionPayload.recipients = {
|
|
322
|
+
items: [{
|
|
323
|
+
id: recipientId,
|
|
324
|
+
objectType: 'person'
|
|
325
|
+
}]
|
|
326
|
+
};
|
|
327
|
+
}
|
|
317
328
|
return this.sendReaction(conversation, deleteReactionPayload);
|
|
318
329
|
},
|
|
319
330
|
/**
|
|
@@ -321,9 +332,10 @@ var Conversation = _webexCore.WebexPlugin.extend({
|
|
|
321
332
|
* @param {Object} conversation
|
|
322
333
|
* @param {Object} displayName must be 'celebrate', 'heart', 'thumbsup', 'smiley', 'haha', 'confused', 'sad'
|
|
323
334
|
* @param {Object} activity activity object from convo we are reacting to
|
|
335
|
+
* @param {String} recipientId,
|
|
324
336
|
* @returns {Promise<Activity>}
|
|
325
337
|
*/
|
|
326
|
-
addReaction: function addReaction(conversation, displayName, activity) {
|
|
338
|
+
addReaction: function addReaction(conversation, displayName, activity, recipientId) {
|
|
327
339
|
var _this6 = this;
|
|
328
340
|
return this.createReactionHmac(displayName, activity).then(function (hmac) {
|
|
329
341
|
var addReactionPayload = {
|
|
@@ -347,6 +359,14 @@ var Conversation = _webexCore.WebexPlugin.extend({
|
|
|
347
359
|
hmac: hmac
|
|
348
360
|
}
|
|
349
361
|
};
|
|
362
|
+
if (recipientId) {
|
|
363
|
+
addReactionPayload.recipients = {
|
|
364
|
+
items: [{
|
|
365
|
+
id: recipientId,
|
|
366
|
+
objectType: 'person'
|
|
367
|
+
}]
|
|
368
|
+
};
|
|
369
|
+
}
|
|
350
370
|
return _this6.sendReaction(conversation, addReactionPayload);
|
|
351
371
|
});
|
|
352
372
|
},
|
|
@@ -404,9 +424,7 @@ var Conversation = _webexCore.WebexPlugin.extend({
|
|
|
404
424
|
var shunt = new _events.EventEmitter();
|
|
405
425
|
var promise;
|
|
406
426
|
if (isEncrypted) {
|
|
407
|
-
promise = this.webex.internal.encryption.download(item.scr, item.options);
|
|
408
|
-
} else if (item.scr && item.scr.loc) {
|
|
409
|
-
promise = this._downloadUnencryptedFile(item.scr.loc, options);
|
|
427
|
+
promise = this.webex.internal.encryption.download(item.url, item.scr, item.options);
|
|
410
428
|
} else {
|
|
411
429
|
promise = this._downloadUnencryptedFile(item.url, options);
|
|
412
430
|
}
|
|
@@ -1081,6 +1099,9 @@ var Conversation = _webexCore.WebexPlugin.extend({
|
|
|
1081
1099
|
type: activity.activityType || activity.parent.type
|
|
1082
1100
|
};
|
|
1083
1101
|
}
|
|
1102
|
+
if (activity.recipients) {
|
|
1103
|
+
act.recipients = activity.recipients;
|
|
1104
|
+
}
|
|
1084
1105
|
if ((0, _isString2.default)(act.actor)) {
|
|
1085
1106
|
act.actor = {
|
|
1086
1107
|
objectType: 'person',
|
|
@@ -2496,7 +2517,7 @@ var Conversation = _webexCore.WebexPlugin.extend({
|
|
|
2496
2517
|
});
|
|
2497
2518
|
}));
|
|
2498
2519
|
},
|
|
2499
|
-
version: "3.0.0-beta.
|
|
2520
|
+
version: "3.0.0-beta.321"
|
|
2500
2521
|
});
|
|
2501
2522
|
['favorite', 'hide', 'lock', 'mute', 'unfavorite', 'unhide', 'unlock', 'unmute'].forEach(function (verb) {
|
|
2502
2523
|
Conversation.prototype[verb] = function submitSimpleActivity(conversation, activity) {
|