|
@@ -7,7 +7,9 @@ import GlobalOnErrorHandler from '../util/GlobalOnErrorHandler';
|
7
|
7
|
import * as JitsiTranscriptionStatus from '../../JitsiTranscriptionStatus';
|
8
|
8
|
import Listenable from '../util/Listenable';
|
9
|
9
|
import * as MediaType from '../../service/RTC/MediaType';
|
|
10
|
+import { createConferenceEvent } from '../../service/statistics/AnalyticsEvents';
|
10
|
11
|
import XMPPEvents from '../../service/xmpp/XMPPEvents';
|
|
12
|
+import Statistics from '../statistics/statistics';
|
11
|
13
|
|
12
|
14
|
import Moderator from './moderator';
|
13
|
15
|
|
|
@@ -127,7 +129,6 @@ export default class ChatRoom extends Listenable {
|
127
|
129
|
|
128
|
130
|
this.locked = false;
|
129
|
131
|
this.transcriptionStatus = JitsiTranscriptionStatus.OFF;
|
130
|
|
- this.meetingId = null;
|
131
|
132
|
}
|
132
|
133
|
|
133
|
134
|
/* eslint-enable max-params */
|
|
@@ -283,16 +284,9 @@ export default class ChatRoom extends Listenable {
|
283
|
284
|
= $(result).find('>query>x[type="result"]>field[var="muc#roominfo_meetingId"]>value');
|
284
|
285
|
|
285
|
286
|
if (meetingIdValEl.length) {
|
286
|
|
- const meetingId = meetingIdValEl.text();
|
287
|
|
-
|
288
|
|
- if (this.meetingId !== meetingId) {
|
289
|
|
- if (this.meetingId) {
|
290
|
|
- logger.warn(`Meeting Id changed from:${this.meetingId} to:${meetingId}`);
|
291
|
|
- }
|
292
|
|
- this.meetingId = meetingId;
|
293
|
|
- }
|
|
287
|
+ this.setMeetingId(meetingIdValEl.text());
|
294
|
288
|
} else {
|
295
|
|
- logger.trace('No meeting id from backend');
|
|
289
|
+ logger.trace('No meeting ID from backend');
|
296
|
290
|
}
|
297
|
291
|
}, error => {
|
298
|
292
|
GlobalOnErrorHandler.callErrorHandler(error);
|
|
@@ -300,6 +294,25 @@ export default class ChatRoom extends Listenable {
|
300
|
294
|
});
|
301
|
295
|
}
|
302
|
296
|
|
|
297
|
+ /**
|
|
298
|
+ * Sets the meeting unique Id (received from the backend).
|
|
299
|
+ *
|
|
300
|
+ * @param {string} meetingId - The new meetings id.
|
|
301
|
+ * @returns {void}
|
|
302
|
+ */
|
|
303
|
+ setMeetingId(meetingId) {
|
|
304
|
+ if (this.meetingId !== meetingId) {
|
|
305
|
+ if (this.meetingId) {
|
|
306
|
+ logger.warn(`Meeting Id changed from:${this.meetingId} to:${meetingId}`);
|
|
307
|
+ }
|
|
308
|
+ this.meetingId = meetingId;
|
|
309
|
+
|
|
310
|
+ // The name of the action is a little bit confusing but it seems this is the preferred name by the consumers
|
|
311
|
+ // of the analytics events.
|
|
312
|
+ Statistics.sendAnalytics(createConferenceEvent('joined', meetingId));
|
|
313
|
+ }
|
|
314
|
+ }
|
|
315
|
+
|
303
|
316
|
/**
|
304
|
317
|
*
|
305
|
318
|
*/
|
|
@@ -952,11 +965,7 @@ export default class ChatRoom extends Listenable {
|
952
|
965
|
}
|
953
|
966
|
|
954
|
967
|
if (from === this.roomjid
|
955
|
|
- && $(msg)
|
956
|
|
- .find(
|
957
|
|
- '>x[xmlns="http://jabber.org/protocol/muc#user"]'
|
958
|
|
- + '>status[code="104"]')
|
959
|
|
- .length) {
|
|
968
|
+ && $(msg).find('>x[xmlns="http://jabber.org/protocol/muc#user"]>status[code="104"]').length) {
|
960
|
969
|
this.discoRoomInfo();
|
961
|
970
|
}
|
962
|
971
|
const jsonMessage = $(msg).find('>json-message').text();
|
|
@@ -1385,7 +1394,9 @@ export default class ChatRoom extends Listenable {
|
1385
|
1394
|
}
|
1386
|
1395
|
|
1387
|
1396
|
/**
|
1388
|
|
- * Returns the meeting unique Id if any came from backend.
|
|
1397
|
+ * Returns the meeting unique ID if any came from backend.
|
|
1398
|
+ *
|
|
1399
|
+ * @returns {string} - The meeting ID.
|
1389
|
1400
|
*/
|
1390
|
1401
|
getMeetingId() {
|
1391
|
1402
|
return this.meetingId;
|