Built motion from commit 19a84241.|2.5.34
[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 _0x7aae=['save','remove','update','emit','register','length','./user.events'];(function(_0x5f4edf,_0x2941a){var _0x4f7b4a=function(_0x3a8f2a){while(--_0x3a8f2a){_0x5f4edf['push'](_0x5f4edf['shift']());}};_0x4f7b4a(++_0x2941a);}(_0x7aae,0x1c6));var _0xe7aa=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x7aae[_0x167cc1];return _0x10bc4b;};'use strict';var UserEvents=require(_0xe7aa('0x0'));var events=[_0xe7aa('0x1'),_0xe7aa('0x2'),_0xe7aa('0x3')];function createListener(_0x5def7e,_0x22197a){return function(_0x11d871){_0x22197a[_0xe7aa('0x4')](_0x5def7e,_0x11d871);};}function removeListener(_0x2fcfb3,_0x58017d){return function(){UserEvents['removeListener'](_0x2fcfb3,_0x58017d);};}exports[_0xe7aa('0x5')]=function(_0x454116){for(var _0x37851c=0x0,_0x55506c=events[_0xe7aa('0x6')];_0x37851c<_0x55506c;_0x37851c++){var _0x3b2bca=events[_0x37851c];var _0x4dc669=createListener('user:'+_0x3b2bca,_0x454116);UserEvents['on'](_0x3b2bca,_0x4dc669);}};