Built motion from commit (unavailable).|2.4.18
[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 _0x360d=['./user.events','remove','emit','length'];(function(_0x4de846,_0x3fb58d){var _0x40b215=function(_0x4fa15b){while(--_0x4fa15b){_0x4de846['push'](_0x4de846['shift']());}};_0x40b215(++_0x3fb58d);}(_0x360d,0x6c));var _0xd360=function(_0x262ee7,_0x52ee92){_0x262ee7=_0x262ee7-0x0;var _0x1dc842=_0x360d[_0x262ee7];return _0x1dc842;};'use strict';var UserEvents=require(_0xd360('0x0'));var events=['save',_0xd360('0x1'),'update'];function createListener(_0x287a1d,_0x11b28e){return function(_0x1c695f){_0x11b28e[_0xd360('0x2')](_0x287a1d,_0x1c695f);};}function removeListener(_0x14bdc4,_0x9e32ab){return function(){UserEvents['removeListener'](_0x14bdc4,_0x9e32ab);};}exports['register']=function(_0x4b585b){for(var _0x4f6f25=0x0,_0x3700bf=events[_0xd360('0x3')];_0x4f6f25<_0x3700bf;_0x4f6f25++){var _0x14fc14=events[_0x4f6f25];var _0x22ad82=createListener('user:'+_0x14fc14,_0x4b585b);UserEvents['on'](_0x14fc14,_0x22ad82);}};