7c199dd0573d32ce63cde09a5c4cc59cbdfb5217
[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 _0xbec1=['remove','emit','removeListener','register','length','whatsappInteraction:','./whatsappInteraction.events'];(function(_0x9f0bdf,_0x14e6ca){var _0x523eca=function(_0x3ac7f6){while(--_0x3ac7f6){_0x9f0bdf['push'](_0x9f0bdf['shift']());}};_0x523eca(++_0x14e6ca);}(_0xbec1,0x141));var _0x1bec=function(_0x30f044,_0x2889bc){_0x30f044=_0x30f044-0x0;var _0x439337=_0xbec1[_0x30f044];return _0x439337;};'use strict';var WhatsappInteractionEvents=require(_0x1bec('0x0'));var events=['save',_0x1bec('0x1'),'update'];function createListener(_0x505376,_0x12ecc0){return function(_0x26cfac){_0x12ecc0[_0x1bec('0x2')](_0x505376,_0x26cfac);};}function removeListener(_0x181a6e,_0x56170a){return function(){WhatsappInteractionEvents[_0x1bec('0x3')](_0x181a6e,_0x56170a);};}exports[_0x1bec('0x4')]=function(_0x38c502){for(var _0x4ec391=0x0,_0x3d57a0=events[_0x1bec('0x5')];_0x4ec391<_0x3d57a0;_0x4ec391++){var _0x2c0cdd=events[_0x4ec391];var _0x31531a=createListener(_0x1bec('0x6')+_0x2c0cdd,_0x38c502);WhatsappInteractionEvents['on'](_0x2c0cdd,_0x31531a);}};