Skip to content

Commit

Permalink
Wow, seems to be a problem with the Router
Browse files Browse the repository at this point in the history
  • Loading branch information
eprochasson committed Jul 11, 2013
1 parent 3ff8f55 commit 280e388
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 21 deletions.
5 changes: 1 addition & 4 deletions client/helpers/presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@ var presenceTick;
Meteor.startup(function(){
// update presences every interval
presenceTick = Meteor.setInterval(function() {
console.log('tick');
Meteor.Presence.update();
}, Presence.checkInterval || 1000);
});



//Session.set('invisible', Meteor.user().invisible);

Meteor.Presence = {
update: function(){
Session.set('last-presence-at', new Date());
Expand Down
7 changes: 5 additions & 2 deletions client/views/mailbox/compose/compose.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
Template.compose.helpers({
friendsList: function(){
var me = Meteor.users.findOne(Meteor.userId());
return Meteor.users.find({_id : {$in : me.friends}}, {reactive: false});
if(Meteor.user()){
return Meteor.users.find({_id : {$in : Meteor.user().friends}}, {reactive: false});
} else {
return {};
}
}
});

Expand Down
1 change: 0 additions & 1 deletion client/views/mailbox/mailbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Template.mailbox.helpers({
return Conversations.find({owner: Meteor.userId()});
},
userInfo: function(){

return this.with;
}
});
5 changes: 2 additions & 3 deletions client/views/widgets/online_friends.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ Template.online_friends.helpers({
return Meteor.users.find({'profile.online': 1, visible: 1, _id: {$in: friends}});
},
count: function(){
// console.log(Meteor.user());
var friends = Meteor.user().friends || [];
return Meteor.users.find({'profile.online': 1, visible: 1, _id: {$in: friends}}).count();
}
});


});
6 changes: 3 additions & 3 deletions main.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if(Meteor.isClient){

/*
Messages
*/
*/
// Duration to measure velocity (default 2 minutes).
//Messages.velocityCaliber = 60*1000*2;
Messages.velocityCaliber = 30*1000;
Expand All @@ -25,7 +25,7 @@ Messages.cooldownPenalty = 10*1000;

/*
User posted Pictures.
*/
*/
// Fields people can change
Pictures.authorizedFields = ['main'];
// Max file size allowed for upload
Expand All @@ -35,7 +35,7 @@ Pictures.maxFilePerUser = -1;

/*
Check user presence
*/
*/
Presence = {};
// How often do we update presence (ms)
Presence.checkInterval = 2000;
Expand Down
18 changes: 10 additions & 8 deletions server/publications.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
Meteor.publish('questions', function(){
return Questions.find();
});

Meteor.publish("myData", function () {
return Meteor.users.find(
{_id: this.userId},
{fields:
{
'profile': 1,
friends: 1,
settings: 1
}
{
profile: 1,
friends: 1,
settings: 1
}
}
);
});


Meteor.publish('questions', function(){
return Questions.find();
});

//Meteor.publish("myConversations", function() {
// Meteor.publishWithRelations({
// handle: this,
Expand Down

0 comments on commit 280e388

Please sign in to comment.