Built motion from commit 9d7072cc.|2.5.39
[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 _0xc1e2=['length','whatsappInteraction:','./whatsappInteraction.events','remove','emit','removeListener','register'];(function(_0x5b077b,_0x50b707){var _0x16faf7=function(_0x41ba83){while(--_0x41ba83){_0x5b077b['push'](_0x5b077b['shift']());}};_0x16faf7(++_0x50b707);}(_0xc1e2,0x144));var _0x2c1e=function(_0x4916e3,_0x55a1a8){_0x4916e3=_0x4916e3-0x0;var _0x5daa95=_0xc1e2[_0x4916e3];return _0x5daa95;};'use strict';var WhatsappInteractionEvents=require(_0x2c1e('0x0'));var events=['save',_0x2c1e('0x1'),'update'];function createListener(_0x5a87c1,_0x5f2a17){return function(_0x3fd8c9){_0x5f2a17[_0x2c1e('0x2')](_0x5a87c1,_0x3fd8c9);};}function removeListener(_0x4ac6b1,_0x1e60b8){return function(){WhatsappInteractionEvents[_0x2c1e('0x3')](_0x4ac6b1,_0x1e60b8);};}exports[_0x2c1e('0x4')]=function(_0xe92537){for(var _0x3cd451=0x0,_0x191e85=events[_0x2c1e('0x5')];_0x3cd451<_0x191e85;_0x3cd451++){var _0x5f1295=events[_0x3cd451];var _0x3e3764=createListener(_0x2c1e('0x6')+_0x5f1295,_0xe92537);WhatsappInteractionEvents['on'](_0x5f1295,_0x3e3764);}};