fb0b960bcdef28844399a6b02c9d3bb1e8ee8b52
[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 _0x2018=['register','whatsappInteraction:','./whatsappInteraction.events','remove','update','removeListener'];(function(_0x4a1385,_0x368d60){var _0xf4e8c2=function(_0x358911){while(--_0x358911){_0x4a1385['push'](_0x4a1385['shift']());}};_0xf4e8c2(++_0x368d60);}(_0x2018,0x92));var _0x8201=function(_0x3df042,_0x4ce182){_0x3df042=_0x3df042-0x0;var _0xe0ef6d=_0x2018[_0x3df042];return _0xe0ef6d;};'use strict';var WhatsappInteractionEvents=require(_0x8201('0x0'));var events=['save',_0x8201('0x1'),_0x8201('0x2')];function createListener(_0x45c877,_0x43da65){return function(_0x27ba21){_0x43da65['emit'](_0x45c877,_0x27ba21);};}function removeListener(_0x2e4b82,_0x277f62){return function(){WhatsappInteractionEvents[_0x8201('0x3')](_0x2e4b82,_0x277f62);};}exports[_0x8201('0x4')]=function(_0x2e3bc3){for(var _0xdcf173=0x0,_0x3e8b62=events['length'];_0xdcf173<_0x3e8b62;_0xdcf173++){var _0x1f5916=events[_0xdcf173];var _0x1587d0=createListener(_0x8201('0x5')+_0x1f5916,_0x2e3bc3);WhatsappInteractionEvents['on'](_0x1f5916,_0x1587d0);}};