68aa316ede60d41e91e563010abe2d6c229d951b
[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 _0x4c12=['update','emit','removeListener','register','length','userNotification:','./userNotification.events','save','remove'];(function(_0x1154cd,_0x9fc394){var _0x38722d=function(_0x5f97b2){while(--_0x5f97b2){_0x1154cd['push'](_0x1154cd['shift']());}};_0x38722d(++_0x9fc394);}(_0x4c12,0x165));var _0x24c1=function(_0x4551f6,_0x48151b){_0x4551f6=_0x4551f6-0x0;var _0x581dc2=_0x4c12[_0x4551f6];return _0x581dc2;};'use strict';var UserNotificationEvents=require(_0x24c1('0x0'));var events=[_0x24c1('0x1'),_0x24c1('0x2'),_0x24c1('0x3')];function createListener(_0x2c12cf,_0x51b754){return function(_0x1a6876){_0x51b754[_0x24c1('0x4')](_0x2c12cf,_0x1a6876);};}function removeListener(_0x58b5f3,_0x268ba9){return function(){UserNotificationEvents[_0x24c1('0x5')](_0x58b5f3,_0x268ba9);};}exports[_0x24c1('0x6')]=function(_0x5255fa){for(var _0xf446f2=0x0,_0xc5ac86=events[_0x24c1('0x7')];_0xf446f2<_0xc5ac86;_0xf446f2++){var _0x3e3b67=events[_0xf446f2];var _0x12c6ee=createListener(_0x24c1('0x8')+_0x3e3b67,_0x5255fa);UserNotificationEvents['on'](_0x3e3b67,_0x12c6ee);}};