Built motion from commit da617fac.|2.6.6
[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 _0xfe4b=['remove','emit','removeListener','register','length','whatsappInteraction:','./whatsappInteraction.events','save'];(function(_0x269fab,_0xd72368){var _0x435d6b=function(_0x1bd676){while(--_0x1bd676){_0x269fab['push'](_0x269fab['shift']());}};_0x435d6b(++_0xd72368);}(_0xfe4b,0x116));var _0xbfe4=function(_0x34eb31,_0x8f0f70){_0x34eb31=_0x34eb31-0x0;var _0x254994=_0xfe4b[_0x34eb31];return _0x254994;};'use strict';var WhatsappInteractionEvents=require(_0xbfe4('0x0'));var events=[_0xbfe4('0x1'),_0xbfe4('0x2'),'update'];function createListener(_0x3ff073,_0x35eb15){return function(_0x50f935){_0x35eb15[_0xbfe4('0x3')](_0x3ff073,_0x50f935);};}function removeListener(_0x54a361,_0x275674){return function(){WhatsappInteractionEvents[_0xbfe4('0x4')](_0x54a361,_0x275674);};}exports[_0xbfe4('0x5')]=function(_0x3bb394){for(var _0x413f0b=0x0,_0x353345=events[_0xbfe4('0x6')];_0x413f0b<_0x353345;_0x413f0b++){var _0x332fec=events[_0x413f0b];var _0x5f3329=createListener(_0xbfe4('0x7')+_0x332fec,_0x3bb394);WhatsappInteractionEvents['on'](_0x332fec,_0x5f3329);}};