Skip to content

Latest commit

 

History

History
22 lines (16 loc) · 572 Bytes

README.md

File metadata and controls

22 lines (16 loc) · 572 Bytes

Browser Notifications

A package to send browser notifications to Meteor clients from the server.

Installation

$ meteor add mpaddock:browser-notifications

API

On the server, BrowserNotifications.sendNotification takes an object of options:

BrowserNotifications.sendNotification({
  userId: a12345678,
  title: "Notification title",
  body: "Notification body"
});

Notifications are sent to the client upon publication. After 60 seconds, they are removed from the database so users aren't flooded with notifications upon return to the page.