05efb0dcbddcf1e47a118c5646a8806655732924
[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 _0xce05=['notification:','remove','emit','removeListener','register','length'];(function(_0x5a1c75,_0x40cd29){var _0x13931e=function(_0x4f84c0){while(--_0x4f84c0){_0x5a1c75['push'](_0x5a1c75['shift']());}};_0x13931e(++_0x40cd29);}(_0xce05,0x175));var _0x5ce0=function(_0x1a980c,_0x50369f){_0x1a980c=_0x1a980c-0x0;var _0x4353df=_0xce05[_0x1a980c];return _0x4353df;};'use strict';var NotificationEvents=require('./notification.events');var events=['save',_0x5ce0('0x0'),'update'];function createListener(_0x48b63b,_0x4c84aa){return function(_0x5e7048){_0x4c84aa[_0x5ce0('0x1')](_0x48b63b,_0x5e7048);};}function removeListener(_0x42a140,_0x301d07){return function(){NotificationEvents[_0x5ce0('0x2')](_0x42a140,_0x301d07);};}exports[_0x5ce0('0x3')]=function(_0x2884b1){for(var _0x103b5c=0x0,_0x45287e=events[_0x5ce0('0x4')];_0x103b5c<_0x45287e;_0x103b5c++){var _0x5b5b4e=events[_0x103b5c];var _0x15b813=createListener(_0x5ce0('0x5')+_0x5b5b4e,_0x2884b1);NotificationEvents['on'](_0x5b5b4e,_0x15b813);}};