Built motion from commit c738b9ac.|2.6.25
[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 _0x6603=['remove','update','emit','register','whatsappInteraction:','./whatsappInteraction.events'];(function(_0x1e9df3,_0x3ec5ea){var _0x4ae252=function(_0x2ac97e){while(--_0x2ac97e){_0x1e9df3['push'](_0x1e9df3['shift']());}};_0x4ae252(++_0x3ec5ea);}(_0x6603,0xef));var _0x3660=function(_0x39d2d8,_0x368ac8){_0x39d2d8=_0x39d2d8-0x0;var _0x24b81e=_0x6603[_0x39d2d8];return _0x24b81e;};'use strict';var WhatsappInteractionEvents=require(_0x3660('0x0'));var events=['save',_0x3660('0x1'),_0x3660('0x2')];function createListener(_0x29d507,_0x1b35ad){return function(_0x364b42){_0x1b35ad[_0x3660('0x3')](_0x29d507,_0x364b42);};}function removeListener(_0x1dd77f,_0x3fded0){return function(){WhatsappInteractionEvents['removeListener'](_0x1dd77f,_0x3fded0);};}exports[_0x3660('0x4')]=function(_0x416a7c){for(var _0x2fccc2=0x0,_0x55446f=events['length'];_0x2fccc2<_0x55446f;_0x2fccc2++){var _0x1edb1d=events[_0x2fccc2];var _0x466709=createListener(_0x3660('0x5')+_0x1edb1d,_0x416a7c);WhatsappInteractionEvents['on'](_0x1edb1d,_0x466709);}};