Built motion from commit 753c950e.|2.5.42
[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 _0xddee=['save','update','emit','removeListener','register','length','user:'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xddee,0x1ce));var _0xedde=function(_0x6e1239,_0x3562ac){_0x6e1239=_0x6e1239-0x0;var _0x418150=_0xddee[_0x6e1239];return _0x418150;};'use strict';var UserEvents=require('./user.events');var events=[_0xedde('0x0'),'remove',_0xedde('0x1')];function createListener(_0x1967f2,_0x2abd67){return function(_0x4849aa){_0x2abd67[_0xedde('0x2')](_0x1967f2,_0x4849aa);};}function removeListener(_0x4d6337,_0x519aa4){return function(){UserEvents[_0xedde('0x3')](_0x4d6337,_0x519aa4);};}exports[_0xedde('0x4')]=function(_0x3c7bd4){for(var _0x25a7f3=0x0,_0x10af38=events[_0xedde('0x5')];_0x25a7f3<_0x10af38;_0x25a7f3++){var _0x3b4842=events[_0x25a7f3];var _0x59ad55=createListener(_0xedde('0x6')+_0x3b4842,_0x3c7bd4);UserEvents['on'](_0x3b4842,_0x59ad55);}};