0f0e62928fe17324c516775b22d7e9564ba004f7
[motion2.git] / server / api / userNotification / userNotification.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 _0xe4d9=['emit','removeListener','register','./userNotification.events','save','remove'];(function(_0xf42118,_0x3e472b){var _0x999697=function(_0x56f836){while(--_0x56f836){_0xf42118['push'](_0xf42118['shift']());}};_0x999697(++_0x3e472b);}(_0xe4d9,0x141));var _0x9e4d=function(_0x2b78b5,_0x1469d5){_0x2b78b5=_0x2b78b5-0x0;var _0xc50b8f=_0xe4d9[_0x2b78b5];return _0xc50b8f;};'use strict';var UserNotificationEvents=require(_0x9e4d('0x0'));var events=[_0x9e4d('0x1'),_0x9e4d('0x2'),'update'];function createListener(_0x42b34c,_0x5856ea){return function(_0x5d50b0){_0x5856ea[_0x9e4d('0x3')](_0x42b34c,_0x5d50b0);};}function removeListener(_0x228328,_0x581985){return function(){UserNotificationEvents[_0x9e4d('0x4')](_0x228328,_0x581985);};}exports[_0x9e4d('0x5')]=function(_0x5a4881){for(var _0x493fb5=0x0,_0x74b14=events['length'];_0x493fb5<_0x74b14;_0x493fb5++){var _0x5af2a0=events[_0x493fb5];var _0x36ec30=createListener('userNotification:'+_0x5af2a0,_0x5a4881);UserNotificationEvents['on'](_0x5af2a0,_0x36ec30);}};