Built motion from commit 85328c08.|2.5.50
[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 _0x6f90=['save','remove','update','emit','removeListener','register','length','user:','./user.events'];(function(_0x24f974,_0x19f818){var _0x297896=function(_0x305e08){while(--_0x305e08){_0x24f974['push'](_0x24f974['shift']());}};_0x297896(++_0x19f818);}(_0x6f90,0x131));var _0x06f9=function(_0x1d04c4,_0x53978b){_0x1d04c4=_0x1d04c4-0x0;var _0x1ac3ed=_0x6f90[_0x1d04c4];return _0x1ac3ed;};'use strict';var UserEvents=require(_0x06f9('0x0'));var events=[_0x06f9('0x1'),_0x06f9('0x2'),_0x06f9('0x3')];function createListener(_0x16496f,_0x14eeb9){return function(_0x4ad675){_0x14eeb9[_0x06f9('0x4')](_0x16496f,_0x4ad675);};}function removeListener(_0x20926f,_0x151f08){return function(){UserEvents[_0x06f9('0x5')](_0x20926f,_0x151f08);};}exports[_0x06f9('0x6')]=function(_0x20c76e){for(var _0x372207=0x0,_0x48da4d=events[_0x06f9('0x7')];_0x372207<_0x48da4d;_0x372207++){var _0x1e24a3=events[_0x372207];var _0x28e578=createListener(_0x06f9('0x8')+_0x1e24a3,_0x20c76e);UserEvents['on'](_0x1e24a3,_0x28e578);}};