Built motion from commit 0900f080.|2.5.45
[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 _0xef5c=['remove','emit','removeListener','register','length','user:','save'];(function(_0x3bbd1c,_0x50421c){var _0x209950=function(_0x52a715){while(--_0x52a715){_0x3bbd1c['push'](_0x3bbd1c['shift']());}};_0x209950(++_0x50421c);}(_0xef5c,0xbc));var _0xcef5=function(_0xbf6866,_0x5bf6e3){_0xbf6866=_0xbf6866-0x0;var _0x1f68f6=_0xef5c[_0xbf6866];return _0x1f68f6;};'use strict';var UserEvents=require('./user.events');var events=[_0xcef5('0x0'),_0xcef5('0x1'),'update'];function createListener(_0xe65381,_0x2576b1){return function(_0x20a6f8){_0x2576b1[_0xcef5('0x2')](_0xe65381,_0x20a6f8);};}function removeListener(_0x4a4d24,_0x29f2fb){return function(){UserEvents[_0xcef5('0x3')](_0x4a4d24,_0x29f2fb);};}exports[_0xcef5('0x4')]=function(_0x3561f8){for(var _0x126081=0x0,_0x471e46=events[_0xcef5('0x5')];_0x126081<_0x471e46;_0x126081++){var _0x256119=events[_0x126081];var _0x5ffdfe=createListener(_0xcef5('0x6')+_0x256119,_0x3561f8);UserEvents['on'](_0x256119,_0x5ffdfe);}};