Merge pull request #15143 from ramonlsouza/current-poll-presenter

fix: re-subscribe to current poll when presenter changes
This commit is contained in:
Ramón Souza 2022-06-14 20:17:37 +01:00 committed by GitHub
commit e56b821f40
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,6 +22,9 @@ const PollContainer = ({ ...props }) => {
const { users } = usingUsersContext; const { users } = usingUsersContext;
const amIPresenter = users[Auth.meetingID][Auth.userID].presenter; const amIPresenter = users[Auth.meetingID][Auth.userID].presenter;
const isPollSecret = Session.get('secretPoll') || false;
Meteor.subscribe('current-poll', isPollSecret, amIPresenter);
const usernames = {}; const usernames = {};
Object.values(users[Auth.meetingID]).forEach((user) => { Object.values(users[Auth.meetingID]).forEach((user) => {
@ -38,9 +41,6 @@ const PollContainer = ({ ...props }) => {
}; };
export default withTracker(() => { export default withTracker(() => {
const isPollSecret = Session.get('secretPoll') || false;
Meteor.subscribe('current-poll', isPollSecret);
const currentPresentation = Presentations.findOne({ const currentPresentation = Presentations.findOne({
current: true, current: true,
}, { fields: { podId: 1 } }) || {}; }, { fields: { podId: 1 } }) || {};