Merge pull request #11568 from mariogasparoni/develop

Improve performance when doing user join notifications
This commit is contained in:
Anton Georgiev 2021-03-05 13:55:08 -05:00 committed by GitHub
commit 13493b4a4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,7 +94,7 @@ class Base extends Component {
});
Session.set('isFullscreen', false);
const users = Users.find({}, { fields: {
const users = Users.find({meetingId: Auth.meetingID}, { fields: {
validated: 1,
name: 1,
userId: 1,
@ -114,9 +114,10 @@ class Base extends Component {
userJoinPushAlerts,
} = Settings.application;
if (!userJoinAudioAlerts && !userJoinPushAlerts) return;
if (user.validated && user.name
&& user.userId !== localUserId
&& meetingId == user.meetingId
&& !this.usersAlreadyInMeetingAtBeggining.includes(user.userId)) {
if (userJoinAudioAlerts) {
AudioService.playAlertSound(`${Meteor.settings.public.app.cdn