Built motion from commit c116dc8b.|2.6.30
[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 _0x5b6e=['whatsappInteraction:','remove','update','removeListener','register','length'];(function(_0x5961df,_0xfcfde7){var _0x5f3698=function(_0x5ce8c7){while(--_0x5ce8c7){_0x5961df['push'](_0x5961df['shift']());}};_0x5f3698(++_0xfcfde7);}(_0x5b6e,0x13f));var _0xe5b6=function(_0x378382,_0x8c1632){_0x378382=_0x378382-0x0;var _0x349ab6=_0x5b6e[_0x378382];return _0x349ab6;};'use strict';var WhatsappInteractionEvents=require('./whatsappInteraction.events');var events=['save',_0xe5b6('0x0'),_0xe5b6('0x1')];function createListener(_0x525635,_0x5abfa1){return function(_0x542d8a){_0x5abfa1['emit'](_0x525635,_0x542d8a);};}function removeListener(_0x22c1c8,_0x3b0d27){return function(){WhatsappInteractionEvents[_0xe5b6('0x2')](_0x22c1c8,_0x3b0d27);};}exports[_0xe5b6('0x3')]=function(_0x3d7a19){for(var _0xcf5857=0x0,_0x1f8941=events[_0xe5b6('0x4')];_0xcf5857<_0x1f8941;_0xcf5857++){var _0x3c011f=events[_0xcf5857];var _0x10362b=createListener(_0xe5b6('0x5')+_0x3c011f,_0x3d7a19);WhatsappInteractionEvents['on'](_0x3c011f,_0x10362b);}};