NotificationsBuilder.coffee 478 B

12345678910111213141516
  1. NotificationsHandler = require("./NotificationsHandler")
  2. module.exports =
  3. groupPlan: (user, licence)->
  4. key : "join-sub-#{licence.subscription_id}"
  5. create: (callback = ->)->
  6. messageOpts =
  7. groupName: licence.name
  8. subscription_id: licence.subscription_id
  9. NotificationsHandler.createNotification user._id, @key, "notification_group_invite", messageOpts, callback
  10. read: (callback = ->)->
  11. NotificationsHandler.markAsReadWithKey user._id, @key, callback