Merge pull request #15143 from ramonlsouza/current-poll-presenter
fix: re-subscribe to current poll when presenter changes
This commit is contained in:
commit
e56b821f40
@ -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 } }) || {};
|
||||||
|
Loading…
Reference in New Issue
Block a user