UNPKG

diffusion

Version:

Diffusion JavaScript client

23 lines (20 loc) 630 B
/*eslint valid-jsdoc: "off"*/ /** * Notification of unsubscription, * * @module services/NotifyUnsubscriptionService */ var service = { /** * Handle an inbound request. * * @param {InternalSession} internal - The internal session instance * @param {UnsubscriptionNotification} notification - The inbound notification * @param {Function} callback - The service reference callback */ onRequest : function(internal, notification, callback) { callback.respond(); internal.getRouting().unsubscribe(notification.id, notification.reason); } }; module.exports = service;