Built motion from commit 0c5f406c.|2.6.29
[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 _0x66f8=['UserId','length','user-setting:','./user-setting.events','update','emit','user-setting:update:user-'];(function(_0x4240af,_0x1619f7){var _0x1f6338=function(_0xb52fd0){while(--_0xb52fd0){_0x4240af['push'](_0x4240af['shift']());}};_0x1f6338(++_0x1619f7);}(_0x66f8,0x137));var _0x866f=function(_0x46fa98,_0x57bf65){_0x46fa98=_0x46fa98-0x0;var _0x2e55ff=_0x66f8[_0x46fa98];return _0x2e55ff;};'use strict';var UserSettingEvents=require(_0x866f('0x0'));var events=['save','remove',_0x866f('0x1')];function createListener(_0x4a75b5,_0x22cc33){return function(_0x3388b9){_0x22cc33[_0x866f('0x2')](_0x4a75b5,_0x3388b9);if(_0x4a75b5==='user-setting:update'){_0x22cc33[_0x866f('0x2')](_0x866f('0x3')+_0x3388b9[_0x866f('0x4')],_0x3388b9);}};}exports['register']=function(_0x344e2b){for(var _0x297b9c=0x0,_0x12f8e6=events[_0x866f('0x5')];_0x297b9c<_0x12f8e6;_0x297b9c++){var _0x31e2c6=events[_0x297b9c];var _0x45c58a=createListener(_0x866f('0x6')+_0x31e2c6,_0x344e2b);UserSettingEvents['on'](_0x31e2c6,_0x45c58a);}};