Built motion from commit 3c2ce842.|2.6.31
[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 _0x4aa5=['length','whatsappInteraction:','remove','emit','removeListener','register'];(function(_0x5a8729,_0x5823e7){var _0x22a4cf=function(_0x573df2){while(--_0x573df2){_0x5a8729['push'](_0x5a8729['shift']());}};_0x22a4cf(++_0x5823e7);}(_0x4aa5,0x122));var _0x54aa=function(_0x4d35e9,_0x495e08){_0x4d35e9=_0x4d35e9-0x0;var _0x241a08=_0x4aa5[_0x4d35e9];return _0x241a08;};'use strict';var WhatsappInteractionEvents=require('./whatsappInteraction.events');var events=['save',_0x54aa('0x0'),'update'];function createListener(_0x65c54f,_0x59fcd6){return function(_0xa45ae2){_0x59fcd6[_0x54aa('0x1')](_0x65c54f,_0xa45ae2);};}function removeListener(_0x2202ed,_0x4718fe){return function(){WhatsappInteractionEvents[_0x54aa('0x2')](_0x2202ed,_0x4718fe);};}exports[_0x54aa('0x3')]=function(_0x531d38){for(var _0x13dd41=0x0,_0x285b1d=events[_0x54aa('0x4')];_0x13dd41<_0x285b1d;_0x13dd41++){var _0x29d4cd=events[_0x13dd41];var _0x1b5236=createListener(_0x54aa('0x5')+_0x29d4cd,_0x531d38);WhatsappInteractionEvents['on'](_0x29d4cd,_0x1b5236);}};