Built motion from commit b5413ace.|2.6.9
[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 _0x05b1=['length','whatsappInteraction:','save','remove','update','emit','register'];(function(_0x1d31d6,_0x3615d3){var _0x4e10c2=function(_0x2e7971){while(--_0x2e7971){_0x1d31d6['push'](_0x1d31d6['shift']());}};_0x4e10c2(++_0x3615d3);}(_0x05b1,0x1de));var _0x105b=function(_0xafcdb0,_0x2306c8){_0xafcdb0=_0xafcdb0-0x0;var _0x1302e2=_0x05b1[_0xafcdb0];return _0x1302e2;};'use strict';var WhatsappInteractionEvents=require('./whatsappInteraction.events');var events=[_0x105b('0x0'),_0x105b('0x1'),_0x105b('0x2')];function createListener(_0x524eea,_0x52c621){return function(_0x5bb8a0){_0x52c621[_0x105b('0x3')](_0x524eea,_0x5bb8a0);};}function removeListener(_0x2238ea,_0x28c486){return function(){WhatsappInteractionEvents['removeListener'](_0x2238ea,_0x28c486);};}exports[_0x105b('0x4')]=function(_0xecb0a8){for(var _0x3b615b=0x0,_0x21c2e2=events[_0x105b('0x5')];_0x3b615b<_0x21c2e2;_0x3b615b++){var _0x24dd5e=events[_0x3b615b];var _0x21749f=createListener(_0x105b('0x6')+_0x24dd5e,_0xecb0a8);WhatsappInteractionEvents['on'](_0x24dd5e,_0x21749f);}};