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 _0xc489=['remove','removeListener','register','length','user:','save'];(function(_0x313163,_0x4c317a){var _0x141333=function(_0x184a8f){while(--_0x184a8f){_0x313163['push'](_0x313163['shift']());}};_0x141333(++_0x4c317a);}(_0xc489,0x11f));var _0x9c48=function(_0x41f4b3,_0x4c535c){_0x41f4b3=_0x41f4b3-0x0;var _0x3a4866=_0xc489[_0x41f4b3];return _0x3a4866;};'use strict';var UserEvents=require('./user.events');var events=[_0x9c48('0x0'),_0x9c48('0x1'),'update'];function createListener(_0x14b80e,_0x5bd022){return function(_0x457d48){_0x5bd022['emit'](_0x14b80e,_0x457d48);};}function removeListener(_0x3b2cc6,_0x1cf4cc){return function(){UserEvents[_0x9c48('0x2')](_0x3b2cc6,_0x1cf4cc);};}exports[_0x9c48('0x3')]=function(_0x43a8eb){for(var _0x2a5e4c=0x0,_0x3b5720=events[_0x9c48('0x4')];_0x2a5e4c<_0x3b5720;_0x2a5e4c++){var _0x2567cd=events[_0x2a5e4c];var _0x251455=createListener(_0x9c48('0x5')+_0x2567cd,_0x43a8eb);UserEvents['on'](_0x2567cd,_0x251455);}};