add: invite user via email, invited user can accept or decline, allow member to quit

This commit is contained in:
floatinghotpot 2015-12-07 11:15:57 +08:00
parent d4c5310d65
commit 011f53ad08
11 changed files with 367 additions and 61 deletions

View file

@ -22,8 +22,11 @@ Template.userAvatar.helpers({
},
presenceStatusClassName() {
const user = Users.findOne(this.userId);
const userPresence = presences.findOne({ userId: this.userId });
if (!userPresence)
if (user && user.isInvitedTo(Session.get('currentBoard')))
return 'pending';
else if (!userPresence)
return 'disconnected';
else if (Session.equals('currentBoard', userPresence.state.currentBoardId))
return 'active';