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