Built motion from commit 775e2a94.|2.6.3
[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 _0x059e=['./user.events','remove','update','emit','register','user:'];(function(_0x3a7e21,_0x1f2c1b){var _0x49a357=function(_0x50144f){while(--_0x50144f){_0x3a7e21['push'](_0x3a7e21['shift']());}};_0x49a357(++_0x1f2c1b);}(_0x059e,0xde));var _0xe059=function(_0x5c251d,_0x1b98ac){_0x5c251d=_0x5c251d-0x0;var _0x17db9c=_0x059e[_0x5c251d];return _0x17db9c;};'use strict';var UserEvents=require(_0xe059('0x0'));var events=['save',_0xe059('0x1'),_0xe059('0x2')];function createListener(_0x258c1a,_0x2f1c1c){return function(_0x33a0a8){_0x2f1c1c[_0xe059('0x3')](_0x258c1a,_0x33a0a8);};}function removeListener(_0xb6a4d0,_0x236092){return function(){UserEvents['removeListener'](_0xb6a4d0,_0x236092);};}exports[_0xe059('0x4')]=function(_0xcfd2eb){for(var _0x3427d0=0x0,_0x2f0e92=events['length'];_0x3427d0<_0x2f0e92;_0x3427d0++){var _0x3e65e8=events[_0x3427d0];var _0x4511fd=createListener(_0xe059('0x5')+_0x3e65e8,_0xcfd2eb);UserEvents['on'](_0x3e65e8,_0x4511fd);}};