499e94144ea0e4d673f5ab3f289a4be7cfc47a41
[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 _0x4b41=['update','emit','removeListener','register','length','whatsappInteraction:','./whatsappInteraction.events'];(function(_0x4d40dd,_0x39592b){var _0x1c51f2=function(_0x53e502){while(--_0x53e502){_0x4d40dd['push'](_0x4d40dd['shift']());}};_0x1c51f2(++_0x39592b);}(_0x4b41,0xae));var _0x14b4=function(_0x1f597c,_0x20bbf4){_0x1f597c=_0x1f597c-0x0;var _0x5c2ad0=_0x4b41[_0x1f597c];return _0x5c2ad0;};'use strict';var WhatsappInteractionEvents=require(_0x14b4('0x0'));var events=['save','remove',_0x14b4('0x1')];function createListener(_0xcba4b9,_0x3bdc4a){return function(_0xc922f6){_0x3bdc4a[_0x14b4('0x2')](_0xcba4b9,_0xc922f6);};}function removeListener(_0x54ab77,_0x301fd8){return function(){WhatsappInteractionEvents[_0x14b4('0x3')](_0x54ab77,_0x301fd8);};}exports[_0x14b4('0x4')]=function(_0xb25bfe){for(var _0x3c2b70=0x0,_0x59816e=events[_0x14b4('0x5')];_0x3c2b70<_0x59816e;_0x3c2b70++){var _0x616fc4=events[_0x3c2b70];var _0x2a007a=createListener(_0x14b4('0x6')+_0x616fc4,_0xb25bfe);WhatsappInteractionEvents['on'](_0x616fc4,_0x2a007a);}};