Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / user / user.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 _0xc8af=['length','remove','update','removeListener'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc8af,0x13d));var _0xfc8a=function(_0x9aa840,_0x84ebbe){_0x9aa840=_0x9aa840-0x0;var _0x1b5e16=_0xc8af[_0x9aa840];return _0x1b5e16;};'use strict';var UserEvents=require('./user.events');var events=['save',_0xfc8a('0x0'),_0xfc8a('0x1')];function createListener(_0x4f978d,_0x5e1ba6){return function(_0x1a7041){_0x5e1ba6['emit'](_0x4f978d,_0x1a7041);};}function removeListener(_0x486aef,_0x4c6496){return function(){UserEvents[_0xfc8a('0x2')](_0x486aef,_0x4c6496);};}exports['register']=function(_0x24b176){for(var _0x43cb29=0x0,_0x44da5c=events[_0xfc8a('0x3')];_0x43cb29<_0x44da5c;_0x43cb29++){var _0x11d8cf=events[_0x43cb29];var _0x52da18=createListener('user:'+_0x11d8cf,_0x24b176);UserEvents['on'](_0x11d8cf,_0x52da18);}};