Built motion from commit 85328c08.|2.5.50
[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 _0xfc34=['removeListener','register','length','user:','./user.events','remove','emit'];(function(_0x43ab60,_0x5a33a8){var _0x18d2c6=function(_0x214be0){while(--_0x214be0){_0x43ab60['push'](_0x43ab60['shift']());}};_0x18d2c6(++_0x5a33a8);}(_0xfc34,0xe4));var _0x4fc3=function(_0x23c827,_0x37332a){_0x23c827=_0x23c827-0x0;var _0x3d7f1f=_0xfc34[_0x23c827];return _0x3d7f1f;};'use strict';var UserEvents=require(_0x4fc3('0x0'));var events=['save',_0x4fc3('0x1'),'update'];function createListener(_0x7867cb,_0x44187e){return function(_0x164f0e){_0x44187e[_0x4fc3('0x2')](_0x7867cb,_0x164f0e);};}function removeListener(_0x33b900,_0xeca59e){return function(){UserEvents[_0x4fc3('0x3')](_0x33b900,_0xeca59e);};}exports[_0x4fc3('0x4')]=function(_0x496d6b){for(var _0x4c23af=0x0,_0x47a669=events[_0x4fc3('0x5')];_0x4c23af<_0x47a669;_0x4c23af++){var _0x404b0d=events[_0x4c23af];var _0x460300=createListener(_0x4fc3('0x6')+_0x404b0d,_0x496d6b);UserEvents['on'](_0x404b0d,_0x460300);}};