From f4c80d1315c181300bd37ef5de98c365325bc130 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Sat, 30 May 2015 15:50:48 +0200 Subject: Implement presence indicators --- collections/users.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'collections/users.js') diff --git a/collections/users.js b/collections/users.js index 6e2c6bdc..2f44e19e 100644 --- a/collections/users.js +++ b/collections/users.js @@ -43,9 +43,6 @@ Users.helpers({ Users.before.insert(function(userId, doc) { doc.profile = doc.profile || {}; - - // connect profile.status default - doc.profile.status = 'offline'; }); if (Meteor.isServer) { @@ -110,3 +107,12 @@ if (Meteor.isServer) { }); }); } + +// Presence indicator +if (Meteor.isClient) { + Presence.state = function() { + return { + currentBoardId: Session.get('currentBoard') + }; + }; +} -- cgit v1.2.3-1-g7c22