4918aaea58ac6a770e5b45328192c6fd0123a12e
[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 _0xcc98=['emit','removeListener','length','save','remove','update'];(function(_0x683723,_0x568943){var _0x1e4abe=function(_0x3f8bac){while(--_0x3f8bac){_0x683723['push'](_0x683723['shift']());}};_0x1e4abe(++_0x568943);}(_0xcc98,0xc3));var _0x8cc9=function(_0x59fc56,_0x5a3d40){_0x59fc56=_0x59fc56-0x0;var _0x3b29fe=_0xcc98[_0x59fc56];return _0x3b29fe;};'use strict';var UserEvents=require('./user.events');var events=[_0x8cc9('0x0'),_0x8cc9('0x1'),_0x8cc9('0x2')];function createListener(_0x508c1c,_0x1f3ff1){return function(_0x118253){_0x1f3ff1[_0x8cc9('0x3')](_0x508c1c,_0x118253);};}function removeListener(_0x51aeec,_0x57cb11){return function(){UserEvents[_0x8cc9('0x4')](_0x51aeec,_0x57cb11);};}exports['register']=function(_0x5d0298){for(var _0x8dbdea=0x0,_0x1cc028=events[_0x8cc9('0x5')];_0x8dbdea<_0x1cc028;_0x8dbdea++){var _0x2a8ece=events[_0x8dbdea];var _0x1636fa=createListener('user:'+_0x2a8ece,_0x5d0298);UserEvents['on'](_0x2a8ece,_0x1636fa);}};