18231451b39917ed29370ae21138166643bde66f
[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 _0xb8a4=['whatsappInteraction:','./whatsappInteraction.events','save','remove','removeListener','length'];(function(_0x3e1151,_0x55eb14){var _0x5e7a3f=function(_0x5978e0){while(--_0x5978e0){_0x3e1151['push'](_0x3e1151['shift']());}};_0x5e7a3f(++_0x55eb14);}(_0xb8a4,0x109));var _0x4b8a=function(_0xcd939f,_0x33117d){_0xcd939f=_0xcd939f-0x0;var _0xe23e6f=_0xb8a4[_0xcd939f];return _0xe23e6f;};'use strict';var WhatsappInteractionEvents=require(_0x4b8a('0x0'));var events=[_0x4b8a('0x1'),_0x4b8a('0x2'),'update'];function createListener(_0x25cfb0,_0x36497e){return function(_0x4c9332){_0x36497e['emit'](_0x25cfb0,_0x4c9332);};}function removeListener(_0x3e5288,_0x5eea74){return function(){WhatsappInteractionEvents[_0x4b8a('0x3')](_0x3e5288,_0x5eea74);};}exports['register']=function(_0xa7518e){for(var _0x5c6c97=0x0,_0x3111a7=events[_0x4b8a('0x4')];_0x5c6c97<_0x3111a7;_0x5c6c97++){var _0x19bbe=events[_0x5c6c97];var _0x28def0=createListener(_0x4b8a('0x5')+_0x19bbe,_0xa7518e);WhatsappInteractionEvents['on'](_0x19bbe,_0x28def0);}};