Built motion from commit (unavailable).|2.5.4
[motion2.git] / server / api / notification / notification.socket.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x27c0=['remove','update','emit','removeListener','register','length'];(function(_0x138adb,_0x193fee){var _0x1b27f2=function(_0x5e97a2){while(--_0x5e97a2){_0x138adb['push'](_0x138adb['shift']());}};_0x1b27f2(++_0x193fee);}(_0x27c0,0x1a4));var _0x027c=function(_0x2c367d,_0x16fdf3){_0x2c367d=_0x2c367d-0x0;var _0x34d53c=_0x27c0[_0x2c367d];return _0x34d53c;};'use strict';var NotificationEvents=require('./notification.events');var events=['save',_0x027c('0x0'),_0x027c('0x1')];function createListener(_0x448ffe,_0x4b21dd){return function(_0x1a16fb){_0x4b21dd[_0x027c('0x2')](_0x448ffe,_0x1a16fb);};}function removeListener(_0x20a85d,_0x267977){return function(){NotificationEvents[_0x027c('0x3')](_0x20a85d,_0x267977);};}exports[_0x027c('0x4')]=function(_0x37c76c){for(var _0x315a43=0x0,_0xa7a385=events[_0x027c('0x5')];_0x315a43<_0xa7a385;_0x315a43++){var _0x49616a=events[_0x315a43];var _0xbe15fb=createListener('notification:'+_0x49616a,_0x37c76c);NotificationEvents['on'](_0x49616a,_0xbe15fb);}};