Built motion from commit 449495f6.|2.6.27
[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 _0x3cd4=['whatsappInteraction:','./whatsappInteraction.events','save','remove','update','emit','removeListener','register'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x3cd4,0x1d9));var _0x43cd=function(_0x16ae45,_0x534ed9){_0x16ae45=_0x16ae45-0x0;var _0x39e1de=_0x3cd4[_0x16ae45];return _0x39e1de;};'use strict';var WhatsappInteractionEvents=require(_0x43cd('0x0'));var events=[_0x43cd('0x1'),_0x43cd('0x2'),_0x43cd('0x3')];function createListener(_0x4e398f,_0x29c5ee){return function(_0x45dfec){_0x29c5ee[_0x43cd('0x4')](_0x4e398f,_0x45dfec);};}function removeListener(_0x20eed,_0x25234c){return function(){WhatsappInteractionEvents[_0x43cd('0x5')](_0x20eed,_0x25234c);};}exports[_0x43cd('0x6')]=function(_0x3d4b41){for(var _0x306f98=0x0,_0x3f80ec=events['length'];_0x306f98<_0x3f80ec;_0x306f98++){var _0x5e8115=events[_0x306f98];var _0x4cf4ba=createListener(_0x43cd('0x7')+_0x5e8115,_0x3d4b41);WhatsappInteractionEvents['on'](_0x5e8115,_0x4cf4ba);}};