Built motion from commit b0a9a629.|2.6.33
[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 _0x7e8b=['remove','emit','removeListener','register','length','user:','./user.events','save'];(function(_0x4947c6,_0x51046d){var _0x29db6a=function(_0x38c305){while(--_0x38c305){_0x4947c6['push'](_0x4947c6['shift']());}};_0x29db6a(++_0x51046d);}(_0x7e8b,0xc6));var _0xb7e8=function(_0x48fcee,_0x431a8b){_0x48fcee=_0x48fcee-0x0;var _0x28d65a=_0x7e8b[_0x48fcee];return _0x28d65a;};'use strict';var UserEvents=require(_0xb7e8('0x0'));var events=[_0xb7e8('0x1'),_0xb7e8('0x2'),'update'];function createListener(_0x366569,_0x21dd44){return function(_0x10065c){_0x21dd44[_0xb7e8('0x3')](_0x366569,_0x10065c);};}function removeListener(_0x9f343c,_0x51910e){return function(){UserEvents[_0xb7e8('0x4')](_0x9f343c,_0x51910e);};}exports[_0xb7e8('0x5')]=function(_0x2f4e53){for(var _0x207227=0x0,_0x44f50c=events[_0xb7e8('0x6')];_0x207227<_0x44f50c;_0x207227++){var _0x4248c4=events[_0x207227];var _0x3e9d14=createListener(_0xb7e8('0x7')+_0x4248c4,_0x2f4e53);UserEvents['on'](_0x4248c4,_0x3e9d14);}};