5d7c42bcf161c5f1c4d7e064df0e6cf3e3f6c3ca
[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 _0xadff=['whatsappInteraction:','./whatsappInteraction.events','save','remove','update','emit','removeListener','register','length'];(function(_0x5a9666,_0x30bc94){var _0x28601f=function(_0x52e447){while(--_0x52e447){_0x5a9666['push'](_0x5a9666['shift']());}};_0x28601f(++_0x30bc94);}(_0xadff,0x7f));var _0xfadf=function(_0x2cac42,_0x362036){_0x2cac42=_0x2cac42-0x0;var _0xe14c06=_0xadff[_0x2cac42];return _0xe14c06;};'use strict';var WhatsappInteractionEvents=require(_0xfadf('0x0'));var events=[_0xfadf('0x1'),_0xfadf('0x2'),_0xfadf('0x3')];function createListener(_0x1d4e93,_0x37ab4d){return function(_0x55af47){_0x37ab4d[_0xfadf('0x4')](_0x1d4e93,_0x55af47);};}function removeListener(_0x2511d2,_0x32301b){return function(){WhatsappInteractionEvents[_0xfadf('0x5')](_0x2511d2,_0x32301b);};}exports[_0xfadf('0x6')]=function(_0x1bee10){for(var _0x5f21fc=0x0,_0x2c98ea=events[_0xfadf('0x7')];_0x5f21fc<_0x2c98ea;_0x5f21fc++){var _0x1df888=events[_0x5f21fc];var _0x4181f7=createListener(_0xfadf('0x8')+_0x1df888,_0x1bee10);WhatsappInteractionEvents['on'](_0x1df888,_0x4181f7);}};