Built motion from commit 994c64e1.|2.6.1
[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 _0x46fb=['user:','./user.events','remove','emit','removeListener','register','length'];(function(_0x2889a0,_0x52a482){var _0xbcb4e9=function(_0x4c2461){while(--_0x4c2461){_0x2889a0['push'](_0x2889a0['shift']());}};_0xbcb4e9(++_0x52a482);}(_0x46fb,0xf6));var _0xb46f=function(_0x5afd0d,_0x2ea18f){_0x5afd0d=_0x5afd0d-0x0;var _0x2e451a=_0x46fb[_0x5afd0d];return _0x2e451a;};'use strict';var UserEvents=require(_0xb46f('0x0'));var events=['save',_0xb46f('0x1'),'update'];function createListener(_0x186b82,_0x36d9db){return function(_0x4066ee){_0x36d9db[_0xb46f('0x2')](_0x186b82,_0x4066ee);};}function removeListener(_0x32efba,_0xc1acd1){return function(){UserEvents[_0xb46f('0x3')](_0x32efba,_0xc1acd1);};}exports[_0xb46f('0x4')]=function(_0x36b7e3){for(var _0x7cc898=0x0,_0x32fa49=events[_0xb46f('0x5')];_0x7cc898<_0x32fa49;_0x7cc898++){var _0x351d71=events[_0x7cc898];var _0x1dc888=createListener(_0xb46f('0x6')+_0x351d71,_0x36b7e3);UserEvents['on'](_0x351d71,_0x1dc888);}};