273700a77deefdb7edfa91370f84693ce3aba5e4
[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 _0xd1ae=['remove','emit','register','length','whatsappInteraction:','./whatsappInteraction.events'];(function(_0x4b2d44,_0x3cb79f){var _0x359d92=function(_0xe00ed4){while(--_0xe00ed4){_0x4b2d44['push'](_0x4b2d44['shift']());}};_0x359d92(++_0x3cb79f);}(_0xd1ae,0x197));var _0xed1a=function(_0x21e39e,_0x16ce15){_0x21e39e=_0x21e39e-0x0;var _0x38eabc=_0xd1ae[_0x21e39e];return _0x38eabc;};'use strict';var WhatsappInteractionEvents=require(_0xed1a('0x0'));var events=['save',_0xed1a('0x1'),'update'];function createListener(_0x2e0573,_0x32b00d){return function(_0xa7edd7){_0x32b00d[_0xed1a('0x2')](_0x2e0573,_0xa7edd7);};}function removeListener(_0x272e6f,_0x2bb78d){return function(){WhatsappInteractionEvents['removeListener'](_0x272e6f,_0x2bb78d);};}exports[_0xed1a('0x3')]=function(_0x26ed2e){for(var _0x507cbe=0x0,_0x19075b=events[_0xed1a('0x4')];_0x507cbe<_0x19075b;_0x507cbe++){var _0x3b8f2d=events[_0x507cbe];var _0x3db68c=createListener(_0xed1a('0x5')+_0x3b8f2d,_0x26ed2e);WhatsappInteractionEvents['on'](_0x3b8f2d,_0x3db68c);}};