Built motion from commit ddca4d0d.|2.5.47
[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 _0x3f1a=['length','whatsappInteraction:','./whatsappInteraction.events','save','remove','emit','removeListener','register'];(function(_0x7e42a9,_0x30740d){var _0xe475b4=function(_0x40490f){while(--_0x40490f){_0x7e42a9['push'](_0x7e42a9['shift']());}};_0xe475b4(++_0x30740d);}(_0x3f1a,0x1c2));var _0xa3f1=function(_0x52a6b0,_0x85e24a){_0x52a6b0=_0x52a6b0-0x0;var _0x41241f=_0x3f1a[_0x52a6b0];return _0x41241f;};'use strict';var WhatsappInteractionEvents=require(_0xa3f1('0x0'));var events=[_0xa3f1('0x1'),_0xa3f1('0x2'),'update'];function createListener(_0x118f56,_0x1bb094){return function(_0x19b74f){_0x1bb094[_0xa3f1('0x3')](_0x118f56,_0x19b74f);};}function removeListener(_0x1a284a,_0x5e2567){return function(){WhatsappInteractionEvents[_0xa3f1('0x4')](_0x1a284a,_0x5e2567);};}exports[_0xa3f1('0x5')]=function(_0x5bed4b){for(var _0x1df176=0x0,_0x4d55e1=events[_0xa3f1('0x6')];_0x1df176<_0x4d55e1;_0x1df176++){var _0xa12d9e=events[_0x1df176];var _0x32d03e=createListener(_0xa3f1('0x7')+_0xa12d9e,_0x5bed4b);WhatsappInteractionEvents['on'](_0xa12d9e,_0x32d03e);}};