Meteor.publish('current-game', function(){
return Games.find({users: this.userId, finished: {$exists: false}}, {limit: 1})
})
Meteor.publish('current-game', function(){
let options = {limit: 1, fields: {myTurn: 0}}
const myTurn = Games.findOne({users: this.userId, nextPlayer: this.userId, finished: {$exists: false}}))
if (myTurn){
options.fields.myTurn=1
}
return Games.find({users: this.userId, finished: {$exists: false}}, {limit: 1})
})