a4e3a5a7a44401cb732ca5e5c7f2fcec16e189d4
[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 _0x1cd5=['update','emit','removeListener','length','remove'];(function(_0x1cf052,_0x5df7ec){var _0x117bc0=function(_0x3034cd){while(--_0x3034cd){_0x1cf052['push'](_0x1cf052['shift']());}};_0x117bc0(++_0x5df7ec);}(_0x1cd5,0x1e4));var _0x51cd=function(_0x3b86bd,_0x45c6f9){_0x3b86bd=_0x3b86bd-0x0;var _0x6647af=_0x1cd5[_0x3b86bd];return _0x6647af;};'use strict';var WhatsappInteractionEvents=require('./whatsappInteraction.events');var events=['save',_0x51cd('0x0'),_0x51cd('0x1')];function createListener(_0x3b4b47,_0x1b90d8){return function(_0x293027){_0x1b90d8[_0x51cd('0x2')](_0x3b4b47,_0x293027);};}function removeListener(_0x287361,_0x568d9f){return function(){WhatsappInteractionEvents[_0x51cd('0x3')](_0x287361,_0x568d9f);};}exports['register']=function(_0x2e3bfc){for(var _0x3ec3ea=0x0,_0x40546e=events[_0x51cd('0x4')];_0x3ec3ea<_0x40546e;_0x3ec3ea++){var _0x1610b7=events[_0x3ec3ea];var _0x11f6ca=createListener('whatsappInteraction:'+_0x1610b7,_0x2e3bfc);WhatsappInteractionEvents['on'](_0x1610b7,_0x11f6ca);}};