Built motion from commit (unavailable).|2.4.18
[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 _0xbdc1=['register','length','./user.events','save','remove','update','removeListener'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0xbdc1,0x14b));var _0x1bdc=function(_0x365a9d,_0x3a1abf){_0x365a9d=_0x365a9d-0x0;var _0x55b87c=_0xbdc1[_0x365a9d];return _0x55b87c;};'use strict';var UserEvents=require(_0x1bdc('0x0'));var events=[_0x1bdc('0x1'),_0x1bdc('0x2'),_0x1bdc('0x3')];function createListener(_0x19f0e6,_0x23381c){return function(_0x2c7074){_0x23381c['emit'](_0x19f0e6,_0x2c7074);};}function removeListener(_0x3eb544,_0x1e802d){return function(){UserEvents[_0x1bdc('0x4')](_0x3eb544,_0x1e802d);};}exports[_0x1bdc('0x5')]=function(_0x2aaff8){for(var _0x93f69f=0x0,_0x2effde=events[_0x1bdc('0x6')];_0x93f69f<_0x2effde;_0x93f69f++){var _0x2ea1be=events[_0x93f69f];var _0x3c8637=createListener('user:'+_0x2ea1be,_0x2aaff8);UserEvents['on'](_0x2ea1be,_0x3c8637);}};