0c0b203e8dade720efd1b31f5f5bd21d8bfb049c
[motion2.git] / server / api / whatsappInteraction / whatsappInteraction.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 _0xfbd5=['save','remove','removeListener','register','whatsappInteraction:','./whatsappInteraction.events'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xfbd5,0x101));var _0x5fbd=function(_0x3ac85c,_0x5b319){_0x3ac85c=_0x3ac85c-0x0;var _0x44ae84=_0xfbd5[_0x3ac85c];return _0x44ae84;};'use strict';var WhatsappInteractionEvents=require(_0x5fbd('0x0'));var events=[_0x5fbd('0x1'),_0x5fbd('0x2'),'update'];function createListener(_0x271922,_0x3255f2){return function(_0x8879c5){_0x3255f2['emit'](_0x271922,_0x8879c5);};}function removeListener(_0x44e480,_0x1c5ee6){return function(){WhatsappInteractionEvents[_0x5fbd('0x3')](_0x44e480,_0x1c5ee6);};}exports[_0x5fbd('0x4')]=function(_0x2636b8){for(var _0x78b85=0x0,_0x2d870c=events['length'];_0x78b85<_0x2d870c;_0x78b85++){var _0x4c12c0=events[_0x78b85];var _0x4a73b1=createListener(_0x5fbd('0x5')+_0x4c12c0,_0x2636b8);WhatsappInteractionEvents['on'](_0x4c12c0,_0x4a73b1);}};