Skip to content

Commit

Permalink
Fix small bug with presence not updating online status for new friends.
Browse files Browse the repository at this point in the history
  • Loading branch information
eprochasson committed Jul 15, 2013
1 parent 19820b8 commit 76bccfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion client/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ Meteor.startup(function(){
// Questions for the profile form.
Meteor.subscribe('questions');


// Meteor.subscribe('adminShowEveryone');
filepicker.setKey(filePickerKey);
});
4 changes: 2 additions & 2 deletions server/presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ Meteor.methods({
} else {
// If the user is not invisible, and the user previously was offline
// tell all his friends he connected
if(!presence.invisible && !presence.online){
Friends.update({ target: Meteor.userId(), live: 1 }, {$set: {online: 1}});
if(!presence.invisible){
Friends.update({ target: Meteor.userId(), live: 1, online: 0 }, {$set: {online: 1}});
}
return Presences.update(
{user: Meteor.userId()},
Expand Down

0 comments on commit 76bccfc

Please sign in to comment.