/easy-presence

An incredibly easy user-presence package based on konecty:user-presence

Primary LanguageJavaScript

Easy-presence

I took konecty:user-presence and simplified it so you only need to add one handlebars expression where you want to see the status of that user's presence.

Add with:

meteor add jeffrey:easy-presence

Note: This package has two defaults:
1. Time of inactivity to set user as away is set automatically to one minute.
2. User is automatically set as away when window loses focus.

Directions:

Add {{> easy_presence}} in your client-side code. You will see a circle icon showing that user's presence status. See this example: http://user-presence-example.meteor.com/

Example:

Html:

<template name="userList">
  {{#each users}}
    <li>{{> easy_presence}}{{emails.[0].address}}</li>
  {{/each}}
</template>

Javascript

Template.userList.helpers({
  'users': function () {
    return Meteor.users.find();
  }
});