b0270f5dc47eccaf1d747e743cd125460c70b3bb
[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 _0x82e4=['removeListener','register','length','./whatsappInteraction.events','save','remove','update'];(function(_0x4a9c44,_0x103a95){var _0x549a65=function(_0x5569d6){while(--_0x5569d6){_0x4a9c44['push'](_0x4a9c44['shift']());}};_0x549a65(++_0x103a95);}(_0x82e4,0x129));var _0x482e=function(_0x6ca7f4,_0x51a5df){_0x6ca7f4=_0x6ca7f4-0x0;var _0x494fa6=_0x82e4[_0x6ca7f4];return _0x494fa6;};'use strict';var WhatsappInteractionEvents=require(_0x482e('0x0'));var events=[_0x482e('0x1'),_0x482e('0x2'),_0x482e('0x3')];function createListener(_0x245d65,_0x1bb0e0){return function(_0x89d5b6){_0x1bb0e0['emit'](_0x245d65,_0x89d5b6);};}function removeListener(_0x49b17e,_0x2fd6e5){return function(){WhatsappInteractionEvents[_0x482e('0x4')](_0x49b17e,_0x2fd6e5);};}exports[_0x482e('0x5')]=function(_0x4d5098){for(var _0x5bb67a=0x0,_0x20edb7=events[_0x482e('0x6')];_0x5bb67a<_0x20edb7;_0x5bb67a++){var _0x35a424=events[_0x5bb67a];var _0x4ac1d2=createListener('whatsappInteraction:'+_0x35a424,_0x4d5098);WhatsappInteractionEvents['on'](_0x35a424,_0x4ac1d2);}};