@atlaskit/collab-provider 8.9.1 → 9.0.1
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/CHANGELOG.md +13 -0
- package/dist/cjs/channel.js +6 -8
- package/dist/cjs/document/catchup.js +8 -1
- package/dist/cjs/document/document-service.js +3 -2
- package/dist/cjs/helpers/const.js +2 -1
- package/dist/cjs/participants/participants-service.js +11 -5
- package/dist/cjs/provider/index.js +20 -7
- package/dist/cjs/types.js +2 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/channel.js +6 -6
- package/dist/es2019/document/catchup.js +8 -0
- package/dist/es2019/document/document-service.js +3 -2
- package/dist/es2019/helpers/const.js +2 -1
- package/dist/es2019/participants/participants-service.js +10 -6
- package/dist/es2019/provider/index.js +13 -3
- package/dist/es2019/types.js +4 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/channel.js +6 -8
- package/dist/esm/document/catchup.js +8 -1
- package/dist/esm/document/document-service.js +3 -2
- package/dist/esm/helpers/const.js +2 -1
- package/dist/esm/participants/participants-service.js +11 -5
- package/dist/esm/provider/index.js +20 -7
- package/dist/esm/types.js +4 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/channel.d.ts +1 -1
- package/dist/types/document/document-service.d.ts +2 -3
- package/dist/types/helpers/const.d.ts +11 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/participants/participants-helper.d.ts +4 -3
- package/dist/types/participants/participants-service.d.ts +4 -3
- package/dist/types/participants/telepointers-helper.d.ts +2 -2
- package/dist/types/provider/index.d.ts +6 -5
- package/dist/types/types.d.ts +58 -8
- package/dist/types-ts4.5/channel.d.ts +1 -1
- package/dist/types-ts4.5/document/document-service.d.ts +2 -3
- package/dist/types-ts4.5/helpers/const.d.ts +11 -3
- package/dist/types-ts4.5/index.d.ts +1 -1
- package/dist/types-ts4.5/participants/participants-helper.d.ts +4 -3
- package/dist/types-ts4.5/participants/participants-service.d.ts +4 -3
- package/dist/types-ts4.5/participants/telepointers-helper.d.ts +2 -2
- package/dist/types-ts4.5/provider/index.d.ts +6 -5
- package/dist/types-ts4.5/types.d.ts +58 -8
- package/package.json +3 -4
- package/report.api.md +105 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @atlaskit/collab-provider
|
|
2
2
|
|
|
3
|
+
## 9.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`6fe0ddc993e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6fe0ddc993e) - ESS-3624 bug fix for missing avatar in editing sessions
|
|
8
|
+
- [`579326b4915`](https://bitbucket.org/atlassian/atlassian-frontend/commits/579326b4915) - ESS-2763 update get final editor state
|
|
9
|
+
|
|
10
|
+
## 9.0.0
|
|
11
|
+
|
|
12
|
+
### Major Changes
|
|
13
|
+
|
|
14
|
+
- [`b7086232a7c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b7086232a7c) - ESS-3135: move collab provider types into @atlaskit/collab-provider
|
|
15
|
+
|
|
3
16
|
## 8.9.1
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/cjs/channel.js
CHANGED
|
@@ -350,6 +350,12 @@ var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
350
350
|
}
|
|
351
351
|
_this.socket.emit('metadata', metadata);
|
|
352
352
|
});
|
|
353
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "sendPresenceJoined", function () {
|
|
354
|
+
if (!_this.connected || !_this.socket) {
|
|
355
|
+
return;
|
|
356
|
+
}
|
|
357
|
+
_this.socket.emit('presence:joined');
|
|
358
|
+
});
|
|
353
359
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "onOnlineHandler", function () {
|
|
354
360
|
// Force an immediate reconnect, the socket must first be closed to reset reconnection delay logic
|
|
355
361
|
if (!_this.connected) {
|
|
@@ -566,14 +572,6 @@ var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
566
572
|
// Fired upon a reconnection attempt error (from Socket.IO Manager)
|
|
567
573
|
this.socket.io.on('reconnect_error', this.onReconnectError);
|
|
568
574
|
}
|
|
569
|
-
}, {
|
|
570
|
-
key: "sendPresenceJoined",
|
|
571
|
-
value: function sendPresenceJoined() {
|
|
572
|
-
if (!this.connected || !this.socket) {
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
this.socket.emit('presence:joined');
|
|
576
|
-
}
|
|
577
575
|
}, {
|
|
578
576
|
key: "disconnect",
|
|
579
577
|
value: function disconnect() {
|
|
@@ -8,6 +8,7 @@ exports.catchup = void 0;
|
|
|
8
8
|
exports.rebaseSteps = rebaseSteps;
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
10
10
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
11
|
+
var _const = require("../helpers/const");
|
|
11
12
|
var _utils = require("../helpers/utils");
|
|
12
13
|
var _prosemirrorTransform = require("prosemirror-transform");
|
|
13
14
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
@@ -42,7 +43,7 @@ function rebaseSteps(steps, mapping) {
|
|
|
42
43
|
}
|
|
43
44
|
var catchup = /*#__PURE__*/function () {
|
|
44
45
|
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(opt) {
|
|
45
|
-
var _yield$opt$fetchCatch, doc, serverStepMaps, serverVersion, metadata, currentPmVersion, unconfirmedSteps, _unconfirmedSteps, stepMaps, mapping, newUnconfirmedSteps;
|
|
46
|
+
var _yield$opt$fetchCatch, doc, serverStepMaps, serverVersion, metadata, currentPmVersion, unconfirmedSteps, _unconfirmedSteps, stepMaps, mapping, newUnconfirmedSteps, _opt$analyticsHelper;
|
|
46
47
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
47
48
|
while (1) switch (_context.prev = _context.next) {
|
|
48
49
|
case 0:
|
|
@@ -120,6 +121,12 @@ var catchup = /*#__PURE__*/function () {
|
|
|
120
121
|
mapping = new _prosemirrorTransform.Mapping(stepMaps);
|
|
121
122
|
logger("".concat(_unconfirmedSteps.length, " unconfirmed steps before rebased: ").concat(JSON.stringify(_unconfirmedSteps)));
|
|
122
123
|
newUnconfirmedSteps = rebaseSteps(_unconfirmedSteps, mapping);
|
|
124
|
+
if ((newUnconfirmedSteps === null || newUnconfirmedSteps === void 0 ? void 0 : newUnconfirmedSteps.length) < _unconfirmedSteps.length) {
|
|
125
|
+
// Log the dropped steps after rebase
|
|
126
|
+
(_opt$analyticsHelper = opt.analyticsHelper) === null || _opt$analyticsHelper === void 0 ? void 0 : _opt$analyticsHelper.sendActionEvent(_const.EVENT_ACTION.DROPPED_STEPS, _const.EVENT_STATUS.SUCCESS, {
|
|
127
|
+
numOfDroppedSteps: _unconfirmedSteps.length - (newUnconfirmedSteps === null || newUnconfirmedSteps === void 0 ? void 0 : newUnconfirmedSteps.length)
|
|
128
|
+
});
|
|
129
|
+
}
|
|
123
130
|
logger("Re-aply ".concat(newUnconfirmedSteps.length, " mapped unconfirmed steps: ").concat(JSON.stringify(newUnconfirmedSteps)));
|
|
124
131
|
// Re-apply local steps
|
|
125
132
|
opt.applyLocalSteps(newUnconfirmedSteps);
|
|
@@ -85,7 +85,8 @@ var DocumentService = /*#__PURE__*/function () {
|
|
|
85
85
|
filterQueue: _this.stepQueue.filterQueue,
|
|
86
86
|
applyLocalSteps: _this.applyLocalSteps,
|
|
87
87
|
updateDocument: _this.updateDocument,
|
|
88
|
-
updateMetadata: _this.metadataService.updateMetadata
|
|
88
|
+
updateMetadata: _this.metadataService.updateMetadata,
|
|
89
|
+
analyticsHelper: _this.analyticsHelper
|
|
89
90
|
});
|
|
90
91
|
case 8:
|
|
91
92
|
latency = new Date().getTime() - start;
|
|
@@ -352,7 +353,7 @@ var DocumentService = /*#__PURE__*/function () {
|
|
|
352
353
|
}
|
|
353
354
|
_this.sendStepsFromCurrentState();
|
|
354
355
|
_context4.next = 12;
|
|
355
|
-
return (0, _utils.sleep)(
|
|
356
|
+
return (0, _utils.sleep)(500);
|
|
356
357
|
case 12:
|
|
357
358
|
nextUnconfirmedSteps = _this.getUnconfirmedSteps();
|
|
358
359
|
if (nextUnconfirmedSteps !== null && nextUnconfirmedSteps !== void 0 && nextUnconfirmedSteps.length) {
|
|
@@ -16,6 +16,7 @@ var EVENT_ACTION = /*#__PURE__*/function (EVENT_ACTION) {
|
|
|
16
16
|
EVENT_ACTION["PUBLISH_PAGE"] = "publishPage";
|
|
17
17
|
EVENT_ACTION["GET_CURRENT_STATE"] = "getCurrentState";
|
|
18
18
|
EVENT_ACTION["INVALIDATE_TOKEN"] = "invalidateToken";
|
|
19
|
+
EVENT_ACTION["DROPPED_STEPS"] = "droppedStepInCatchup";
|
|
19
20
|
return EVENT_ACTION;
|
|
20
21
|
}({});
|
|
21
22
|
exports.EVENT_ACTION = EVENT_ACTION;
|
|
@@ -32,7 +33,7 @@ var ADD_STEPS_TYPE = /*#__PURE__*/function (ADD_STEPS_TYPE) {
|
|
|
32
33
|
return ADD_STEPS_TYPE;
|
|
33
34
|
}({});
|
|
34
35
|
exports.ADD_STEPS_TYPE = ADD_STEPS_TYPE;
|
|
35
|
-
var ACK_MAX_TRY =
|
|
36
|
+
var ACK_MAX_TRY = 60;
|
|
36
37
|
exports.ACK_MAX_TRY = ACK_MAX_TRY;
|
|
37
38
|
var CONFLUENCE = 'confluence';
|
|
38
39
|
exports.CONFLUENCE = CONFLUENCE;
|
|
@@ -38,6 +38,8 @@ var ParticipantsService = /*#__PURE__*/function () {
|
|
|
38
38
|
var getUser = arguments.length > 3 ? arguments[3] : undefined;
|
|
39
39
|
var channelBroadcast = arguments.length > 4 ? arguments[4] : undefined;
|
|
40
40
|
var sendPresenceJoined = arguments.length > 5 ? arguments[5] : undefined;
|
|
41
|
+
var getPresenceData = arguments.length > 6 ? arguments[6] : undefined;
|
|
42
|
+
var setUserId = arguments.length > 7 ? arguments[7] : undefined;
|
|
41
43
|
(0, _classCallCheck2.default)(this, ParticipantsService);
|
|
42
44
|
/**
|
|
43
45
|
* Carries out 3 things: 1) enriches the participant with user data, 2) updates the participantsState, 3) emits the presence event
|
|
@@ -234,12 +236,13 @@ var ParticipantsService = /*#__PURE__*/function () {
|
|
|
234
236
|
(0, _defineProperty2.default)(this, "clearTimers", function () {
|
|
235
237
|
clearTimeout(_this.participantUpdateTimeout);
|
|
236
238
|
});
|
|
237
|
-
(0, _defineProperty2.default)(this, "sendPresence", function (
|
|
239
|
+
(0, _defineProperty2.default)(this, "sendPresence", function () {
|
|
238
240
|
try {
|
|
239
241
|
clearTimeout(_this.presenceUpdateTimeout);
|
|
240
|
-
_this.
|
|
242
|
+
var _data = _this.getPresenceData();
|
|
243
|
+
_this.channelBroadcast('participant:updated', _data);
|
|
241
244
|
_this.presenceUpdateTimeout = window.setTimeout(function () {
|
|
242
|
-
return _this.sendPresence(
|
|
245
|
+
return _this.sendPresence();
|
|
243
246
|
}, SEND_PRESENCE_INTERVAL);
|
|
244
247
|
} catch (error) {
|
|
245
248
|
var _this$analyticsHelper7;
|
|
@@ -258,7 +261,7 @@ var ParticipantsService = /*#__PURE__*/function () {
|
|
|
258
261
|
try {
|
|
259
262
|
logger('Participant joined with session: ', payload.sessionId);
|
|
260
263
|
// This expose existing users to the newly joined user
|
|
261
|
-
_this.sendPresence(
|
|
264
|
+
_this.sendPresence();
|
|
262
265
|
} catch (error) {
|
|
263
266
|
var _this$analyticsHelper8;
|
|
264
267
|
// We don't want to throw errors for Presence features as they tend to self-restore
|
|
@@ -274,7 +277,8 @@ var ParticipantsService = /*#__PURE__*/function () {
|
|
|
274
277
|
(0, _defineProperty2.default)(this, "onPresence", function (payload) {
|
|
275
278
|
try {
|
|
276
279
|
logger('onPresence userId: ', payload.userId);
|
|
277
|
-
_this.
|
|
280
|
+
_this.setUserId(payload.userId);
|
|
281
|
+
_this.sendPresence();
|
|
278
282
|
_this.sendPresenceJoined();
|
|
279
283
|
} catch (error) {
|
|
280
284
|
var _this$analyticsHelper9;
|
|
@@ -288,6 +292,8 @@ var ParticipantsService = /*#__PURE__*/function () {
|
|
|
288
292
|
this.getUser = getUser;
|
|
289
293
|
this.channelBroadcast = channelBroadcast;
|
|
290
294
|
this.sendPresenceJoined = sendPresenceJoined;
|
|
295
|
+
this.getPresenceData = getPresenceData;
|
|
296
|
+
this.setUserId = setUserId;
|
|
291
297
|
}
|
|
292
298
|
(0, _createClass2.default)(ParticipantsService, [{
|
|
293
299
|
key: "emitTelepointersFromSteps",
|
|
@@ -115,6 +115,16 @@ var Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
115
115
|
return _this.participantsService.onParticipantTelepointer(payload, _this.sessionId);
|
|
116
116
|
}).on('presence:joined', _this.participantsService.onPresenceJoined).on('presence', _this.participantsService.onPresence).on('participant:left', _this.participantsService.onParticipantLeft).on('participant:updated', _this.participantsService.onParticipantUpdated).on('disconnect', _this.onDisconnected.bind((0, _assertThisInitialized2.default)(_this))).on('error', _this.onErrorHandled).on('status', _this.namespaceService.onNamespaceStatusChanged).connect(shouldInitialize);
|
|
117
117
|
});
|
|
118
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "setUserId", function (id) {
|
|
119
|
+
_this.userId = id;
|
|
120
|
+
});
|
|
121
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getPresenceData", function () {
|
|
122
|
+
return {
|
|
123
|
+
sessionId: _this.sessionId,
|
|
124
|
+
userId: _this.userId,
|
|
125
|
+
clientId: _this.clientId
|
|
126
|
+
};
|
|
127
|
+
});
|
|
118
128
|
/**
|
|
119
129
|
* @param {InternalError} error The error to handle
|
|
120
130
|
*/
|
|
@@ -183,17 +193,20 @@ var Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
183
193
|
while (1) switch (_context2.prev = _context2.next) {
|
|
184
194
|
case 0:
|
|
185
195
|
_context2.prev = 0;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
196
|
+
_context2.next = 3;
|
|
197
|
+
return _this.documentService.getFinalAcknowledgedState();
|
|
198
|
+
case 3:
|
|
199
|
+
return _context2.abrupt("return", _context2.sent);
|
|
200
|
+
case 6:
|
|
201
|
+
_context2.prev = 6;
|
|
189
202
|
_context2.t0 = _context2["catch"](0);
|
|
190
203
|
(_this$analyticsHelper4 = _this.analyticsHelper) === null || _this$analyticsHelper4 === void 0 ? void 0 : _this$analyticsHelper4.sendErrorEvent(_context2.t0, 'Error while returning ADF version of the final draft document');
|
|
191
204
|
throw new _errorTypes.GetFinalAcknowledgedStateError('Error while returning the final acknowledged state of the draft document', _context2.t0);
|
|
192
|
-
case
|
|
205
|
+
case 10:
|
|
193
206
|
case "end":
|
|
194
207
|
return _context2.stop();
|
|
195
208
|
}
|
|
196
|
-
}, _callee2, null, [[0,
|
|
209
|
+
}, _callee2, null, [[0, 6]]);
|
|
197
210
|
})));
|
|
198
211
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getUnconfirmedSteps", function () {
|
|
199
212
|
return _this.documentService.getUnconfirmedSteps();
|
|
@@ -212,7 +225,7 @@ var Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
212
225
|
_this.initialDraft = _this.config.initialDraft;
|
|
213
226
|
_this.isProviderInitialized = false;
|
|
214
227
|
_this.isPreinitializing = false;
|
|
215
|
-
_this.participantsService = new _participantsService.ParticipantsService(_this.analyticsHelper, undefined, _this.emitCallback, _this.config.getUser, _this.channel.broadcast, _this.channel.sendPresenceJoined);
|
|
228
|
+
_this.participantsService = new _participantsService.ParticipantsService(_this.analyticsHelper, undefined, _this.emitCallback, _this.config.getUser, _this.channel.broadcast, _this.channel.sendPresenceJoined, _this.getPresenceData, _this.setUserId);
|
|
216
229
|
_this.metadataService = new _metadataService.MetadataService(_this.emitCallback, _this.channel.sendMetadata);
|
|
217
230
|
_this.documentService = new _documentService.DocumentService(_this.participantsService, _this.analyticsHelper, _this.channel.fetchCatchup, _this.emitCallback, _this.channel.broadcast, function () {
|
|
218
231
|
return _this.userId;
|
|
@@ -332,7 +345,7 @@ var Provider = /*#__PURE__*/function (_Emitter) {
|
|
|
332
345
|
/**
|
|
333
346
|
* Send messages, such as telepointers, to NCS and other participants. Only used for telepointer data (text and node selections) in the editor and JWM. JWM does some weird serialisation stuff on the node selections.
|
|
334
347
|
* Silently fails if an error occurs, since Presence isn't a critical functionality and self-restores over time.
|
|
335
|
-
* @param {
|
|
348
|
+
* @param {CollabTelepointerPayload} data Data you want to send to NCS / the other participants
|
|
336
349
|
* @param {string} data.type Can only be 'telepointer' for now, we don't support anything else yet
|
|
337
350
|
* @param {CollabSendableSelection} data.selection Object representing the selected element
|
|
338
351
|
* @param {string} data.sessionId Identifier identifying the session
|
package/dist/cjs/types.js
CHANGED
|
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AcknowledgementResponseTypes = void 0;
|
|
7
|
+
// types from editor common
|
|
8
|
+
// types from editor common end
|
|
7
9
|
// Initial draft
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use ProviderError type instead
|
|
10
|
-
*/
|
|
11
10
|
// Channel
|
|
12
11
|
/**
|
|
13
12
|
* @description Incoming payload type from the `broadcast` route in NCS
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/collab-provider";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "
|
|
9
|
+
var version = "9.0.1";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/channel.js
CHANGED
|
@@ -250,6 +250,12 @@ export class Channel extends Emitter {
|
|
|
250
250
|
}
|
|
251
251
|
this.socket.emit('metadata', metadata);
|
|
252
252
|
});
|
|
253
|
+
_defineProperty(this, "sendPresenceJoined", () => {
|
|
254
|
+
if (!this.connected || !this.socket) {
|
|
255
|
+
return;
|
|
256
|
+
}
|
|
257
|
+
this.socket.emit('presence:joined');
|
|
258
|
+
});
|
|
253
259
|
_defineProperty(this, "onOnlineHandler", () => {
|
|
254
260
|
// Force an immediate reconnect, the socket must first be closed to reset reconnection delay logic
|
|
255
261
|
if (!this.connected) {
|
|
@@ -433,12 +439,6 @@ export class Channel extends Emitter {
|
|
|
433
439
|
// Fired upon a reconnection attempt error (from Socket.IO Manager)
|
|
434
440
|
this.socket.io.on('reconnect_error', this.onReconnectError);
|
|
435
441
|
}
|
|
436
|
-
sendPresenceJoined() {
|
|
437
|
-
if (!this.connected || !this.socket) {
|
|
438
|
-
return;
|
|
439
|
-
}
|
|
440
|
-
this.socket.emit('presence:joined');
|
|
441
|
-
}
|
|
442
442
|
disconnect() {
|
|
443
443
|
var _this$network;
|
|
444
444
|
this.unsubscribeAll();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
|
|
1
2
|
import { createLogger } from '../helpers/utils';
|
|
2
3
|
import { StepMap, Mapping } from 'prosemirror-transform';
|
|
3
4
|
const logger = createLogger('Catchup', 'red');
|
|
@@ -93,6 +94,13 @@ export const catchup = async opt => {
|
|
|
93
94
|
const mapping = new Mapping(stepMaps);
|
|
94
95
|
logger(`${unconfirmedSteps.length} unconfirmed steps before rebased: ${JSON.stringify(unconfirmedSteps)}`);
|
|
95
96
|
const newUnconfirmedSteps = rebaseSteps(unconfirmedSteps, mapping);
|
|
97
|
+
if ((newUnconfirmedSteps === null || newUnconfirmedSteps === void 0 ? void 0 : newUnconfirmedSteps.length) < unconfirmedSteps.length) {
|
|
98
|
+
var _opt$analyticsHelper;
|
|
99
|
+
// Log the dropped steps after rebase
|
|
100
|
+
(_opt$analyticsHelper = opt.analyticsHelper) === null || _opt$analyticsHelper === void 0 ? void 0 : _opt$analyticsHelper.sendActionEvent(EVENT_ACTION.DROPPED_STEPS, EVENT_STATUS.SUCCESS, {
|
|
101
|
+
numOfDroppedSteps: unconfirmedSteps.length - (newUnconfirmedSteps === null || newUnconfirmedSteps === void 0 ? void 0 : newUnconfirmedSteps.length)
|
|
102
|
+
});
|
|
103
|
+
}
|
|
96
104
|
logger(`Re-aply ${newUnconfirmedSteps.length} mapped unconfirmed steps: ${JSON.stringify(newUnconfirmedSteps)}`);
|
|
97
105
|
// Re-apply local steps
|
|
98
106
|
opt.applyLocalSteps(newUnconfirmedSteps);
|
|
@@ -62,7 +62,8 @@ export class DocumentService {
|
|
|
62
62
|
filterQueue: this.stepQueue.filterQueue,
|
|
63
63
|
applyLocalSteps: this.applyLocalSteps,
|
|
64
64
|
updateDocument: this.updateDocument,
|
|
65
|
-
updateMetadata: this.metadataService.updateMetadata
|
|
65
|
+
updateMetadata: this.metadataService.updateMetadata,
|
|
66
|
+
analyticsHelper: this.analyticsHelper
|
|
66
67
|
});
|
|
67
68
|
const latency = new Date().getTime() - start;
|
|
68
69
|
(_this$analyticsHelper = this.analyticsHelper) === null || _this$analyticsHelper === void 0 ? void 0 : _this$analyticsHelper.sendActionEvent(EVENT_ACTION.CATCHUP, EVENT_STATUS.SUCCESS, {
|
|
@@ -290,7 +291,7 @@ export class DocumentService {
|
|
|
290
291
|
let isLastTrConfirmed = false;
|
|
291
292
|
while (!isLastTrConfirmed) {
|
|
292
293
|
this.sendStepsFromCurrentState();
|
|
293
|
-
await sleep(
|
|
294
|
+
await sleep(500);
|
|
294
295
|
const nextUnconfirmedSteps = this.getUnconfirmedSteps();
|
|
295
296
|
if (nextUnconfirmedSteps !== null && nextUnconfirmedSteps !== void 0 && nextUnconfirmedSteps.length) {
|
|
296
297
|
const nextUnconfirmedTrs = this.getUnconfirmedStepsOrigins();
|
|
@@ -10,6 +10,7 @@ export let EVENT_ACTION = /*#__PURE__*/function (EVENT_ACTION) {
|
|
|
10
10
|
EVENT_ACTION["PUBLISH_PAGE"] = "publishPage";
|
|
11
11
|
EVENT_ACTION["GET_CURRENT_STATE"] = "getCurrentState";
|
|
12
12
|
EVENT_ACTION["INVALIDATE_TOKEN"] = "invalidateToken";
|
|
13
|
+
EVENT_ACTION["DROPPED_STEPS"] = "droppedStepInCatchup";
|
|
13
14
|
return EVENT_ACTION;
|
|
14
15
|
}({});
|
|
15
16
|
export let EVENT_STATUS = /*#__PURE__*/function (EVENT_STATUS) {
|
|
@@ -23,5 +24,5 @@ export let ADD_STEPS_TYPE = /*#__PURE__*/function (ADD_STEPS_TYPE) {
|
|
|
23
24
|
ADD_STEPS_TYPE["ERROR"] = "ERROR";
|
|
24
25
|
return ADD_STEPS_TYPE;
|
|
25
26
|
}({});
|
|
26
|
-
export const ACK_MAX_TRY =
|
|
27
|
+
export const ACK_MAX_TRY = 60;
|
|
27
28
|
export const CONFLUENCE = 'confluence';
|
|
@@ -18,7 +18,7 @@ const SEND_PRESENCE_INTERVAL = 150 * 1000; // 150 seconds
|
|
|
18
18
|
* @param sendPresenceJoined Callback to Channel class
|
|
19
19
|
*/
|
|
20
20
|
export class ParticipantsService {
|
|
21
|
-
constructor(analyticsHelper, participantsState = new ParticipantsState(), emit, getUser, channelBroadcast, sendPresenceJoined) {
|
|
21
|
+
constructor(analyticsHelper, participantsState = new ParticipantsState(), emit, getUser, channelBroadcast, sendPresenceJoined, getPresenceData, setUserId) {
|
|
22
22
|
/**
|
|
23
23
|
* Carries out 3 things: 1) enriches the participant with user data, 2) updates the participantsState, 3) emits the presence event
|
|
24
24
|
* @param payload Payload from incoming socket event
|
|
@@ -187,11 +187,12 @@ export class ParticipantsService {
|
|
|
187
187
|
_defineProperty(this, "clearTimers", () => {
|
|
188
188
|
clearTimeout(this.participantUpdateTimeout);
|
|
189
189
|
});
|
|
190
|
-
_defineProperty(this, "sendPresence",
|
|
190
|
+
_defineProperty(this, "sendPresence", () => {
|
|
191
191
|
try {
|
|
192
192
|
clearTimeout(this.presenceUpdateTimeout);
|
|
193
|
-
this.
|
|
194
|
-
this.
|
|
193
|
+
const data = this.getPresenceData();
|
|
194
|
+
this.channelBroadcast('participant:updated', data);
|
|
195
|
+
this.presenceUpdateTimeout = window.setTimeout(() => this.sendPresence(), SEND_PRESENCE_INTERVAL);
|
|
195
196
|
} catch (error) {
|
|
196
197
|
var _this$analyticsHelper7;
|
|
197
198
|
// We don't want to throw errors for Presence features as they tend to self-restore
|
|
@@ -209,7 +210,7 @@ export class ParticipantsService {
|
|
|
209
210
|
try {
|
|
210
211
|
logger('Participant joined with session: ', payload.sessionId);
|
|
211
212
|
// This expose existing users to the newly joined user
|
|
212
|
-
this.sendPresence(
|
|
213
|
+
this.sendPresence();
|
|
213
214
|
} catch (error) {
|
|
214
215
|
var _this$analyticsHelper8;
|
|
215
216
|
// We don't want to throw errors for Presence features as they tend to self-restore
|
|
@@ -225,7 +226,8 @@ export class ParticipantsService {
|
|
|
225
226
|
_defineProperty(this, "onPresence", payload => {
|
|
226
227
|
try {
|
|
227
228
|
logger('onPresence userId: ', payload.userId);
|
|
228
|
-
this.
|
|
229
|
+
this.setUserId(payload.userId);
|
|
230
|
+
this.sendPresence();
|
|
229
231
|
this.sendPresenceJoined();
|
|
230
232
|
} catch (error) {
|
|
231
233
|
var _this$analyticsHelper9;
|
|
@@ -239,6 +241,8 @@ export class ParticipantsService {
|
|
|
239
241
|
this.getUser = getUser;
|
|
240
242
|
this.channelBroadcast = channelBroadcast;
|
|
241
243
|
this.sendPresenceJoined = sendPresenceJoined;
|
|
244
|
+
this.getPresenceData = getPresenceData;
|
|
245
|
+
this.setUserId = setUserId;
|
|
242
246
|
}
|
|
243
247
|
/**
|
|
244
248
|
* Called on receiving steps, emits each step's telepointer
|
|
@@ -91,6 +91,16 @@ export class Provider extends Emitter {
|
|
|
91
91
|
this.isProviderInitialized = true;
|
|
92
92
|
}).on('restore', this.documentService.onRestore).on('steps:added', this.documentService.onStepsAdded).on('metadata:changed', this.metadataService.onMetadataChanged).on('participant:telepointer', payload => this.participantsService.onParticipantTelepointer(payload, this.sessionId)).on('presence:joined', this.participantsService.onPresenceJoined).on('presence', this.participantsService.onPresence).on('participant:left', this.participantsService.onParticipantLeft).on('participant:updated', this.participantsService.onParticipantUpdated).on('disconnect', this.onDisconnected.bind(this)).on('error', this.onErrorHandled).on('status', this.namespaceService.onNamespaceStatusChanged).connect(shouldInitialize);
|
|
93
93
|
});
|
|
94
|
+
_defineProperty(this, "setUserId", id => {
|
|
95
|
+
this.userId = id;
|
|
96
|
+
});
|
|
97
|
+
_defineProperty(this, "getPresenceData", () => {
|
|
98
|
+
return {
|
|
99
|
+
sessionId: this.sessionId,
|
|
100
|
+
userId: this.userId,
|
|
101
|
+
clientId: this.clientId
|
|
102
|
+
};
|
|
103
|
+
});
|
|
94
104
|
/**
|
|
95
105
|
* @param {InternalError} error The error to handle
|
|
96
106
|
*/
|
|
@@ -147,7 +157,7 @@ export class Provider extends Emitter {
|
|
|
147
157
|
*/
|
|
148
158
|
_defineProperty(this, "getFinalAcknowledgedState", async () => {
|
|
149
159
|
try {
|
|
150
|
-
return this.documentService.getFinalAcknowledgedState();
|
|
160
|
+
return await this.documentService.getFinalAcknowledgedState();
|
|
151
161
|
} catch (error) {
|
|
152
162
|
var _this$analyticsHelper4;
|
|
153
163
|
(_this$analyticsHelper4 = this.analyticsHelper) === null || _this$analyticsHelper4 === void 0 ? void 0 : _this$analyticsHelper4.sendErrorEvent(error, 'Error while returning ADF version of the final draft document');
|
|
@@ -171,7 +181,7 @@ export class Provider extends Emitter {
|
|
|
171
181
|
this.initialDraft = this.config.initialDraft;
|
|
172
182
|
this.isProviderInitialized = false;
|
|
173
183
|
this.isPreinitializing = false;
|
|
174
|
-
this.participantsService = new ParticipantsService(this.analyticsHelper, undefined, this.emitCallback, this.config.getUser, this.channel.broadcast, this.channel.sendPresenceJoined);
|
|
184
|
+
this.participantsService = new ParticipantsService(this.analyticsHelper, undefined, this.emitCallback, this.config.getUser, this.channel.broadcast, this.channel.sendPresenceJoined, this.getPresenceData, this.setUserId);
|
|
175
185
|
this.metadataService = new MetadataService(this.emitCallback, this.channel.sendMetadata);
|
|
176
186
|
this.documentService = new DocumentService(this.participantsService, this.analyticsHelper, this.channel.fetchCatchup, this.emitCallback, this.channel.broadcast, () => this.userId, this.onErrorHandled, this.metadataService);
|
|
177
187
|
this.getStatePromise = new Promise(resolve => {
|
|
@@ -275,7 +285,7 @@ export class Provider extends Emitter {
|
|
|
275
285
|
/**
|
|
276
286
|
* Send messages, such as telepointers, to NCS and other participants. Only used for telepointer data (text and node selections) in the editor and JWM. JWM does some weird serialisation stuff on the node selections.
|
|
277
287
|
* Silently fails if an error occurs, since Presence isn't a critical functionality and self-restores over time.
|
|
278
|
-
* @param {
|
|
288
|
+
* @param {CollabTelepointerPayload} data Data you want to send to NCS / the other participants
|
|
279
289
|
* @param {string} data.type Can only be 'telepointer' for now, we don't support anything else yet
|
|
280
290
|
* @param {CollabSendableSelection} data.selection Object representing the selected element
|
|
281
291
|
* @param {string} data.sessionId Identifier identifying the session
|
package/dist/es2019/types.js
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/channel.js
CHANGED
|
@@ -343,6 +343,12 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
343
343
|
}
|
|
344
344
|
_this.socket.emit('metadata', metadata);
|
|
345
345
|
});
|
|
346
|
+
_defineProperty(_assertThisInitialized(_this), "sendPresenceJoined", function () {
|
|
347
|
+
if (!_this.connected || !_this.socket) {
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
_this.socket.emit('presence:joined');
|
|
351
|
+
});
|
|
346
352
|
_defineProperty(_assertThisInitialized(_this), "onOnlineHandler", function () {
|
|
347
353
|
// Force an immediate reconnect, the socket must first be closed to reset reconnection delay logic
|
|
348
354
|
if (!_this.connected) {
|
|
@@ -559,14 +565,6 @@ export var Channel = /*#__PURE__*/function (_Emitter) {
|
|
|
559
565
|
// Fired upon a reconnection attempt error (from Socket.IO Manager)
|
|
560
566
|
this.socket.io.on('reconnect_error', this.onReconnectError);
|
|
561
567
|
}
|
|
562
|
-
}, {
|
|
563
|
-
key: "sendPresenceJoined",
|
|
564
|
-
value: function sendPresenceJoined() {
|
|
565
|
-
if (!this.connected || !this.socket) {
|
|
566
|
-
return;
|
|
567
|
-
}
|
|
568
|
-
this.socket.emit('presence:joined');
|
|
569
|
-
}
|
|
570
568
|
}, {
|
|
571
569
|
key: "disconnect",
|
|
572
570
|
value: function disconnect() {
|
|
@@ -3,6 +3,7 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
|
3
3
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
4
4
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
5
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
6
|
+
import { EVENT_ACTION, EVENT_STATUS } from '../helpers/const';
|
|
6
7
|
import { createLogger } from '../helpers/utils';
|
|
7
8
|
import { StepMap, Mapping } from 'prosemirror-transform';
|
|
8
9
|
var logger = createLogger('Catchup', 'red');
|
|
@@ -34,7 +35,7 @@ export function rebaseSteps(steps, mapping) {
|
|
|
34
35
|
}
|
|
35
36
|
export var catchup = /*#__PURE__*/function () {
|
|
36
37
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(opt) {
|
|
37
|
-
var _yield$opt$fetchCatch, doc, serverStepMaps, serverVersion, metadata, currentPmVersion, unconfirmedSteps, _unconfirmedSteps, stepMaps, mapping, newUnconfirmedSteps;
|
|
38
|
+
var _yield$opt$fetchCatch, doc, serverStepMaps, serverVersion, metadata, currentPmVersion, unconfirmedSteps, _unconfirmedSteps, stepMaps, mapping, newUnconfirmedSteps, _opt$analyticsHelper;
|
|
38
39
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
39
40
|
while (1) switch (_context.prev = _context.next) {
|
|
40
41
|
case 0:
|
|
@@ -112,6 +113,12 @@ export var catchup = /*#__PURE__*/function () {
|
|
|
112
113
|
mapping = new Mapping(stepMaps);
|
|
113
114
|
logger("".concat(_unconfirmedSteps.length, " unconfirmed steps before rebased: ").concat(JSON.stringify(_unconfirmedSteps)));
|
|
114
115
|
newUnconfirmedSteps = rebaseSteps(_unconfirmedSteps, mapping);
|
|
116
|
+
if ((newUnconfirmedSteps === null || newUnconfirmedSteps === void 0 ? void 0 : newUnconfirmedSteps.length) < _unconfirmedSteps.length) {
|
|
117
|
+
// Log the dropped steps after rebase
|
|
118
|
+
(_opt$analyticsHelper = opt.analyticsHelper) === null || _opt$analyticsHelper === void 0 ? void 0 : _opt$analyticsHelper.sendActionEvent(EVENT_ACTION.DROPPED_STEPS, EVENT_STATUS.SUCCESS, {
|
|
119
|
+
numOfDroppedSteps: _unconfirmedSteps.length - (newUnconfirmedSteps === null || newUnconfirmedSteps === void 0 ? void 0 : newUnconfirmedSteps.length)
|
|
120
|
+
});
|
|
121
|
+
}
|
|
115
122
|
logger("Re-aply ".concat(newUnconfirmedSteps.length, " mapped unconfirmed steps: ").concat(JSON.stringify(newUnconfirmedSteps)));
|
|
116
123
|
// Re-apply local steps
|
|
117
124
|
opt.applyLocalSteps(newUnconfirmedSteps);
|
|
@@ -78,7 +78,8 @@ export var DocumentService = /*#__PURE__*/function () {
|
|
|
78
78
|
filterQueue: _this.stepQueue.filterQueue,
|
|
79
79
|
applyLocalSteps: _this.applyLocalSteps,
|
|
80
80
|
updateDocument: _this.updateDocument,
|
|
81
|
-
updateMetadata: _this.metadataService.updateMetadata
|
|
81
|
+
updateMetadata: _this.metadataService.updateMetadata,
|
|
82
|
+
analyticsHelper: _this.analyticsHelper
|
|
82
83
|
});
|
|
83
84
|
case 8:
|
|
84
85
|
latency = new Date().getTime() - start;
|
|
@@ -345,7 +346,7 @@ export var DocumentService = /*#__PURE__*/function () {
|
|
|
345
346
|
}
|
|
346
347
|
_this.sendStepsFromCurrentState();
|
|
347
348
|
_context4.next = 12;
|
|
348
|
-
return sleep(
|
|
349
|
+
return sleep(500);
|
|
349
350
|
case 12:
|
|
350
351
|
nextUnconfirmedSteps = _this.getUnconfirmedSteps();
|
|
351
352
|
if (nextUnconfirmedSteps !== null && nextUnconfirmedSteps !== void 0 && nextUnconfirmedSteps.length) {
|
|
@@ -10,6 +10,7 @@ export var EVENT_ACTION = /*#__PURE__*/function (EVENT_ACTION) {
|
|
|
10
10
|
EVENT_ACTION["PUBLISH_PAGE"] = "publishPage";
|
|
11
11
|
EVENT_ACTION["GET_CURRENT_STATE"] = "getCurrentState";
|
|
12
12
|
EVENT_ACTION["INVALIDATE_TOKEN"] = "invalidateToken";
|
|
13
|
+
EVENT_ACTION["DROPPED_STEPS"] = "droppedStepInCatchup";
|
|
13
14
|
return EVENT_ACTION;
|
|
14
15
|
}({});
|
|
15
16
|
export var EVENT_STATUS = /*#__PURE__*/function (EVENT_STATUS) {
|
|
@@ -23,5 +24,5 @@ export var ADD_STEPS_TYPE = /*#__PURE__*/function (ADD_STEPS_TYPE) {
|
|
|
23
24
|
ADD_STEPS_TYPE["ERROR"] = "ERROR";
|
|
24
25
|
return ADD_STEPS_TYPE;
|
|
25
26
|
}({});
|
|
26
|
-
export var ACK_MAX_TRY =
|
|
27
|
+
export var ACK_MAX_TRY = 60;
|
|
27
28
|
export var CONFLUENCE = 'confluence';
|
|
@@ -31,6 +31,8 @@ export var ParticipantsService = /*#__PURE__*/function () {
|
|
|
31
31
|
var getUser = arguments.length > 3 ? arguments[3] : undefined;
|
|
32
32
|
var channelBroadcast = arguments.length > 4 ? arguments[4] : undefined;
|
|
33
33
|
var sendPresenceJoined = arguments.length > 5 ? arguments[5] : undefined;
|
|
34
|
+
var getPresenceData = arguments.length > 6 ? arguments[6] : undefined;
|
|
35
|
+
var setUserId = arguments.length > 7 ? arguments[7] : undefined;
|
|
34
36
|
_classCallCheck(this, ParticipantsService);
|
|
35
37
|
/**
|
|
36
38
|
* Carries out 3 things: 1) enriches the participant with user data, 2) updates the participantsState, 3) emits the presence event
|
|
@@ -227,12 +229,13 @@ export var ParticipantsService = /*#__PURE__*/function () {
|
|
|
227
229
|
_defineProperty(this, "clearTimers", function () {
|
|
228
230
|
clearTimeout(_this.participantUpdateTimeout);
|
|
229
231
|
});
|
|
230
|
-
_defineProperty(this, "sendPresence", function (
|
|
232
|
+
_defineProperty(this, "sendPresence", function () {
|
|
231
233
|
try {
|
|
232
234
|
clearTimeout(_this.presenceUpdateTimeout);
|
|
233
|
-
_this.
|
|
235
|
+
var _data = _this.getPresenceData();
|
|
236
|
+
_this.channelBroadcast('participant:updated', _data);
|
|
234
237
|
_this.presenceUpdateTimeout = window.setTimeout(function () {
|
|
235
|
-
return _this.sendPresence(
|
|
238
|
+
return _this.sendPresence();
|
|
236
239
|
}, SEND_PRESENCE_INTERVAL);
|
|
237
240
|
} catch (error) {
|
|
238
241
|
var _this$analyticsHelper7;
|
|
@@ -251,7 +254,7 @@ export var ParticipantsService = /*#__PURE__*/function () {
|
|
|
251
254
|
try {
|
|
252
255
|
logger('Participant joined with session: ', payload.sessionId);
|
|
253
256
|
// This expose existing users to the newly joined user
|
|
254
|
-
_this.sendPresence(
|
|
257
|
+
_this.sendPresence();
|
|
255
258
|
} catch (error) {
|
|
256
259
|
var _this$analyticsHelper8;
|
|
257
260
|
// We don't want to throw errors for Presence features as they tend to self-restore
|
|
@@ -267,7 +270,8 @@ export var ParticipantsService = /*#__PURE__*/function () {
|
|
|
267
270
|
_defineProperty(this, "onPresence", function (payload) {
|
|
268
271
|
try {
|
|
269
272
|
logger('onPresence userId: ', payload.userId);
|
|
270
|
-
_this.
|
|
273
|
+
_this.setUserId(payload.userId);
|
|
274
|
+
_this.sendPresence();
|
|
271
275
|
_this.sendPresenceJoined();
|
|
272
276
|
} catch (error) {
|
|
273
277
|
var _this$analyticsHelper9;
|
|
@@ -281,6 +285,8 @@ export var ParticipantsService = /*#__PURE__*/function () {
|
|
|
281
285
|
this.getUser = getUser;
|
|
282
286
|
this.channelBroadcast = channelBroadcast;
|
|
283
287
|
this.sendPresenceJoined = sendPresenceJoined;
|
|
288
|
+
this.getPresenceData = getPresenceData;
|
|
289
|
+
this.setUserId = setUserId;
|
|
284
290
|
}
|
|
285
291
|
_createClass(ParticipantsService, [{
|
|
286
292
|
key: "emitTelepointersFromSteps",
|