1d10efea517c17f6581ecc0386706f1a1cee2e5f
[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 _0x39ed=['whatsappInteraction:','save','remove','emit','removeListener','register','length'];(function(_0x5a5c09,_0x155d52){var _0x339def=function(_0x28745a){while(--_0x28745a){_0x5a5c09['push'](_0x5a5c09['shift']());}};_0x339def(++_0x155d52);}(_0x39ed,0x1dd));var _0xd39e=function(_0x312b7a,_0x1ed902){_0x312b7a=_0x312b7a-0x0;var _0x76a85c=_0x39ed[_0x312b7a];return _0x76a85c;};'use strict';var WhatsappInteractionEvents=require('./whatsappInteraction.events');var events=[_0xd39e('0x0'),_0xd39e('0x1'),'update'];function createListener(_0x5824e2,_0x253a1d){return function(_0x42b4ba){_0x253a1d[_0xd39e('0x2')](_0x5824e2,_0x42b4ba);};}function removeListener(_0x35760a,_0x5bdb6b){return function(){WhatsappInteractionEvents[_0xd39e('0x3')](_0x35760a,_0x5bdb6b);};}exports[_0xd39e('0x4')]=function(_0x27989c){for(var _0x76654d=0x0,_0xb3f924=events[_0xd39e('0x5')];_0x76654d<_0xb3f924;_0x76654d++){var _0x221fbe=events[_0x76654d];var _0x4f162b=createListener(_0xd39e('0x6')+_0x221fbe,_0x27989c);WhatsappInteractionEvents['on'](_0x221fbe,_0x4f162b);}};