diff --git a/bigbluebutton-html5/imports/startup/client/base.jsx b/bigbluebutton-html5/imports/startup/client/base.jsx
index b3f0ff58ec..eae2a5cbc0 100755
--- a/bigbluebutton-html5/imports/startup/client/base.jsx
+++ b/bigbluebutton-html5/imports/startup/client/base.jsx
@@ -219,15 +219,33 @@ const BaseContainer = withTracker(() => {
let breakoutRoomSubscriptionHandler;
let meetingModeratorSubscriptionHandler;
- const User = Users.findOne({ intId: credentials.requesterUserId });
- const meeting = Meetings.findOne({ meetingId });
- if (meeting) {
- const { meetingEnded } = meeting;
- if (meetingEnded) Session.set('codeError', '410');
+ const fields = {
+ approved: 1,
+ authed: 1,
+ ejected: 1,
+ color: 1,
+ effectiveConnectionType: 1,
+ extId: 1,
+ guest: 1,
+ intId: 1,
+ locked: 1,
+ loggedOut: 1,
+ meetingId: 1,
+ userId: 1,
+ };
+ const User = Users.findOne({ intId: credentials.requesterUserId }, { fields });
+ const meeting = Meetings.findOne({ meetingId }, {
+ fields: {
+ meetingEnded: 1,
+ },
+ });
+
+ if (meeting && meeting.meetingEnded) {
+ Session.set('codeError', '410');
}
- const approved = !!Users.findOne({ userId: Auth.userID, approved: true, guest: true });
- const ejected = Users.findOne({ userId: Auth.userID, ejected: true });
+ const approved = User && User.approved && User.guest;
+ const ejected = User && User.ejected;
let userSubscriptionHandler;
@@ -252,7 +270,7 @@ const BaseContainer = withTracker(() => {
},
});
- Meetings.find({ meetingId }).observe({
+ Meetings.find({ meetingId }, { fields: { recordProp: 1 } }).observe({
changed: (newDocument, oldDocument) => {
if (newDocument.recordProp) {
if (!oldDocument.recordProp.recording && newDocument.recordProp.recording) {
diff --git a/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx b/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx
index 163409fd8e..d2cdfa46ee 100644
--- a/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx
@@ -22,7 +22,7 @@ const ActionsBarContainer = props => ;
export default withTracker(() => {
const POLLING_ENABLED = Meteor.settings.public.poll.enabled;
- Meetings.find({ meetingId: Auth.meetingID }).observeChanges({
+ Meetings.find({ meetingId: Auth.meetingID }, { fields: { recordProp: 1 } }).observeChanges({
changed: (id, fields) => {
if (fields.recordProp && fields.recordProp.recording) {
this.window.parent.postMessage({ response: 'recordingStarted' }, '*');
diff --git a/bigbluebutton-html5/imports/ui/components/app/container.jsx b/bigbluebutton-html5/imports/ui/components/app/container.jsx
index 99ffd87db3..787de1b7c5 100755
--- a/bigbluebutton-html5/imports/ui/components/app/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/app/container.jsx
@@ -79,7 +79,7 @@ export default injectIntl(withModalMounter(withTracker(({ intl, baseControls })
}
// Check if user is removed out of the session
- Users.find({ userId: Auth.userID }).observeChanges({
+ Users.find({ userId: Auth.userID }, { fields: { connectionId: 1, ejected: 1 }}).observeChanges({
changed(id, fields) {
const hasNewConnection = 'connectionId' in fields && (fields.connectionId !== Meteor.connection._lastSessionId);
diff --git a/bigbluebutton-html5/imports/ui/components/nav-bar/container.jsx b/bigbluebutton-html5/imports/ui/components/nav-bar/container.jsx
index a2fa605efe..40e8c86a80 100755
--- a/bigbluebutton-html5/imports/ui/components/nav-bar/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/nav-bar/container.jsx
@@ -44,7 +44,7 @@ export default withTracker(() => {
return hasUnreadMessages;
};
- Meetings.find({ meetingId: Auth.meetingID }).observeChanges({
+ Meetings.find({ meetingId: Auth.meetingID }, { fields: { recordProp: 1 } }).observeChanges({
changed: (id, fields) => {
if (fields.recordProp && fields.recordProp.recording) {
this.window.parent.postMessage({ response: 'recordingStarted' }, '*');
diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/container.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/container.jsx
index 046c59aab5..3ac0e39535 100644
--- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/container.jsx
+++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-participants/user-list-item/container.jsx
@@ -12,7 +12,7 @@ const UserListItemContainer = props => ;
export default withTracker(({ userId }) => {
const findUserInBreakout = Breakouts.findOne({ 'joinedUsers.userId': new RegExp(`^${userId}`) });
const breakoutSequence = (findUserInBreakout || {}).sequence;
- const Meeting = Meetings.findOne({ MeetingId: Auth.meetingID });
+ const Meeting = Meetings.findOne({ MeetingId: Auth.meetingID }, { fields: {meetingProp: 1}});
return {
user: mapUser(Users.findOne({ userId })),
userInBreakout: !!findUserInBreakout,
diff --git a/bigbluebutton-html5/imports/ui/components/whiteboard/service.js b/bigbluebutton-html5/imports/ui/components/whiteboard/service.js
index 714142f974..e736a0e809 100755
--- a/bigbluebutton-html5/imports/ui/components/whiteboard/service.js
+++ b/bigbluebutton-html5/imports/ui/components/whiteboard/service.js
@@ -187,7 +187,7 @@ WhiteboardMultiUser.find({ meetingId: Auth.meetingID }).observeChanges({
changed: clearFakeAnnotations,
});
-Users.find({ userId: Auth.userID }).observeChanges({
+Users.find({ userId: Auth.userID }, { fields: { presenter: 1 } }).observeChanges({
changed(id, { presenter }) {
if (presenter === false) clearFakeAnnotations();
},