f60a897dd5494183f0dd2429995fe41f753b6a38
[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 _0x17b2=['remove','update','emit','removeListener','user:','save'];(function(_0x5d2ada,_0x32f631){var _0x44769d=function(_0xe784c3){while(--_0xe784c3){_0x5d2ada['push'](_0x5d2ada['shift']());}};_0x44769d(++_0x32f631);}(_0x17b2,0x89));var _0x217b=function(_0x57a608,_0xcd52c){_0x57a608=_0x57a608-0x0;var _0x58e88e=_0x17b2[_0x57a608];return _0x58e88e;};'use strict';var UserEvents=require('./user.events');var events=[_0x217b('0x0'),_0x217b('0x1'),_0x217b('0x2')];function createListener(_0x523073,_0x526051){return function(_0x476089){_0x526051[_0x217b('0x3')](_0x523073,_0x476089);};}function removeListener(_0x5e58b4,_0xa1850b){return function(){UserEvents[_0x217b('0x4')](_0x5e58b4,_0xa1850b);};}exports['register']=function(_0x5ae451){for(var _0x2b14a0=0x0,_0x817638=events['length'];_0x2b14a0<_0x817638;_0x2b14a0++){var _0x58cfe1=events[_0x2b14a0];var _0x1bf8aa=createListener(_0x217b('0x5')+_0x58cfe1,_0x5ae451);UserEvents['on'](_0x58cfe1,_0x1bf8aa);}};