Built motion from commit 14588770.|2.5.38
[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 _0xc332=['register','length','save','update','removeListener'];(function(_0x2ff2cb,_0x429c8b){var _0x27e306=function(_0x3d524a){while(--_0x3d524a){_0x2ff2cb['push'](_0x2ff2cb['shift']());}};_0x27e306(++_0x429c8b);}(_0xc332,0x183));var _0x2c33=function(_0x4c4dc9,_0x1cf5ae){_0x4c4dc9=_0x4c4dc9-0x0;var _0x2e5b34=_0xc332[_0x4c4dc9];return _0x2e5b34;};'use strict';var UserEvents=require('./user.events');var events=[_0x2c33('0x0'),'remove',_0x2c33('0x1')];function createListener(_0x2a98a7,_0x51eeb1){return function(_0x1eaf1c){_0x51eeb1['emit'](_0x2a98a7,_0x1eaf1c);};}function removeListener(_0x5dfb0c,_0x2b1528){return function(){UserEvents[_0x2c33('0x2')](_0x5dfb0c,_0x2b1528);};}exports[_0x2c33('0x3')]=function(_0x2c4d6a){for(var _0x2cceb3=0x0,_0x37fb5d=events[_0x2c33('0x4')];_0x2cceb3<_0x37fb5d;_0x2cceb3++){var _0x180897=events[_0x2cceb3];var _0x34fad6=createListener('user:'+_0x180897,_0x2c4d6a);UserEvents['on'](_0x180897,_0x34fad6);}};