a2d94b4756e1787bbd38cdb87a18dec6aa66bb0e
[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 _0x4612=['remove','update','emit','removeListener','register','length','whatsappInteraction:','./whatsappInteraction.events','save'];(function(_0x26f702,_0x3919bf){var _0x11417d=function(_0x1aa3e8){while(--_0x1aa3e8){_0x26f702['push'](_0x26f702['shift']());}};_0x11417d(++_0x3919bf);}(_0x4612,0xa9));var _0x2461=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x4612[_0x19e35c];return _0x3e1fe8;};'use strict';var WhatsappInteractionEvents=require(_0x2461('0x0'));var events=[_0x2461('0x1'),_0x2461('0x2'),_0x2461('0x3')];function createListener(_0x3d1027,_0x10c55a){return function(_0x26a299){_0x10c55a[_0x2461('0x4')](_0x3d1027,_0x26a299);};}function removeListener(_0x4a1774,_0x469983){return function(){WhatsappInteractionEvents[_0x2461('0x5')](_0x4a1774,_0x469983);};}exports[_0x2461('0x6')]=function(_0x1c6bd2){for(var _0x348ea5=0x0,_0x256df8=events[_0x2461('0x7')];_0x348ea5<_0x256df8;_0x348ea5++){var _0x1b9fd9=events[_0x348ea5];var _0x49bca3=createListener(_0x2461('0x8')+_0x1b9fd9,_0x1c6bd2);WhatsappInteractionEvents['on'](_0x1b9fd9,_0x49bca3);}};