70688c26c07859b0754298292e33b26698eb25c6
[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 _0x746d=['save','remove','emit','removeListener','length','whatsappInteraction:','./whatsappInteraction.events'];(function(_0x6ef71c,_0x597370){var _0x472693=function(_0x29feca){while(--_0x29feca){_0x6ef71c['push'](_0x6ef71c['shift']());}};_0x472693(++_0x597370);}(_0x746d,0xd1));var _0xd746=function(_0x29d891,_0x36778e){_0x29d891=_0x29d891-0x0;var _0x36d7a1=_0x746d[_0x29d891];return _0x36d7a1;};'use strict';var WhatsappInteractionEvents=require(_0xd746('0x0'));var events=[_0xd746('0x1'),_0xd746('0x2'),'update'];function createListener(_0x2883f7,_0x5b3363){return function(_0x399b42){_0x5b3363[_0xd746('0x3')](_0x2883f7,_0x399b42);};}function removeListener(_0x1dee84,_0x226e3b){return function(){WhatsappInteractionEvents[_0xd746('0x4')](_0x1dee84,_0x226e3b);};}exports['register']=function(_0x333b9f){for(var _0x5487b0=0x0,_0x31dc1c=events[_0xd746('0x5')];_0x5487b0<_0x31dc1c;_0x5487b0++){var _0x20d442=events[_0x5487b0];var _0x47c28f=createListener(_0xd746('0x6')+_0x20d442,_0x333b9f);WhatsappInteractionEvents['on'](_0x20d442,_0x47c28f);}};