mirror of
https://github.com/wekan/wekan.git
synced 2025-04-20 12:07:11 -04:00
fix bug where old users could see broken presence indicators on new users
This commit is contained in:
parent
1ad4107201
commit
7b5d08afd1
1 changed files with 15 additions and 14 deletions
|
@ -99,20 +99,21 @@ Meteor.publishRelations('board', function(boardId) {
|
|||
this.cursor(Attachments.find({ cardId }));
|
||||
});
|
||||
|
||||
// Board members. This publication also includes former board members that
|
||||
// aren't members anymore but may have some activities attached to them in
|
||||
// the history.
|
||||
//
|
||||
this.cursor(Users.find({
|
||||
_id: { $in: _.pluck(board.members, 'userId') },
|
||||
}, { fields: {
|
||||
'username': 1,
|
||||
'profile.fullname': 1,
|
||||
'profile.avatarUrl': 1,
|
||||
}}), function(userId) {
|
||||
// Presence indicators
|
||||
this.cursor(presences.find({ userId }));
|
||||
});
|
||||
if (board.members) {
|
||||
// Board members. This publication also includes former board members that
|
||||
// aren't members anymore but may have some activities attached to them in
|
||||
// the history.
|
||||
this.cursor(Users.find({
|
||||
_id: { $in: _.pluck(board.members, 'userId') },
|
||||
}, { fields: {
|
||||
'username': 1,
|
||||
'profile.fullname': 1,
|
||||
'profile.avatarUrl': 1,
|
||||
}}), function(userId) {
|
||||
// Presence indicators
|
||||
this.cursor(presences.find({ userId }));
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return this.ready();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue