Built motion from commit 598073ad.|2.5.44
[motion2.git] / server / api / user-setting / user-setting.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 _0x053d=['./user-setting.events','save','update','emit','user-setting:update:user-','UserId','register','length'];(function(_0x1e9c52,_0x3a3f9e){var _0x30d528=function(_0x338161){while(--_0x338161){_0x1e9c52['push'](_0x1e9c52['shift']());}};_0x30d528(++_0x3a3f9e);}(_0x053d,0x110));var _0xd053=function(_0x1295e0,_0x2cebe8){_0x1295e0=_0x1295e0-0x0;var _0x59fa9c=_0x053d[_0x1295e0];return _0x59fa9c;};'use strict';var UserSettingEvents=require(_0xd053('0x0'));var events=[_0xd053('0x1'),'remove',_0xd053('0x2')];function createListener(_0x1e780a,_0xf2925a){return function(_0x28d097){_0xf2925a['emit'](_0x1e780a,_0x28d097);if(_0x1e780a==='user-setting:update'){_0xf2925a[_0xd053('0x3')](_0xd053('0x4')+_0x28d097[_0xd053('0x5')],_0x28d097);}};}exports[_0xd053('0x6')]=function(_0x634929){for(var _0x39114a=0x0,_0x134282=events[_0xd053('0x7')];_0x39114a<_0x134282;_0x39114a++){var _0x292fba=events[_0x39114a];var _0x2ba188=createListener('user-setting:'+_0x292fba,_0x634929);UserSettingEvents['on'](_0x292fba,_0x2ba188);}};