c5cbe20c9cba572cb25c05cbff1f1dd664ad82d4
[motion2.git] / server / api / userProfile / userProfile.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 _0x9994=['./userProfile.events','remove','register','length'];(function(_0x45482b,_0x6af805){var _0x104fce=function(_0x5e60e5){while(--_0x5e60e5){_0x45482b['push'](_0x45482b['shift']());}};_0x104fce(++_0x6af805);}(_0x9994,0x1a0));var _0x4999=function(_0x4c7935,_0x4a53fb){_0x4c7935=_0x4c7935-0x0;var _0x30651d=_0x9994[_0x4c7935];return _0x30651d;};'use strict';var UserProfileEvents=require(_0x4999('0x0'));var events=['save',_0x4999('0x1'),'update'];function createListener(_0x552627,_0x32fa35){return function(_0x555238){_0x32fa35['emit'](_0x552627,_0x555238);};}function removeListener(_0x5e97e5,_0x25f092){return function(){UserProfileEvents['removeListener'](_0x5e97e5,_0x25f092);};}exports[_0x4999('0x2')]=function(_0x2b0c9f){for(var _0x5e2011=0x0,_0x259705=events[_0x4999('0x3')];_0x5e2011<_0x259705;_0x5e2011++){var _0x3f80d8=events[_0x5e2011];var _0x4e0760=createListener('userProfile:'+_0x3f80d8,_0x2b0c9f);UserProfileEvents['on'](_0x3f80d8,_0x4e0760);}};