Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / whatsappMessage / whatsappMessage.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 _0x9f58=['save','remove','update','emit','removeListener','register','length','whatsappMessage:','./whatsappMessage.events'];(function(_0x53c7b8,_0x5df100){var _0x1421c2=function(_0x4be500){while(--_0x4be500){_0x53c7b8['push'](_0x53c7b8['shift']());}};_0x1421c2(++_0x5df100);}(_0x9f58,0x182));var _0x89f5=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x9f58[_0xa464c9];return _0x3d73c4;};'use strict';var WhatsappMessageEvents=require(_0x89f5('0x0'));var events=[_0x89f5('0x1'),_0x89f5('0x2'),_0x89f5('0x3')];function createListener(_0x1bb1b2,_0x5868d2){return function(_0x5d293c){_0x5868d2[_0x89f5('0x4')](_0x1bb1b2,_0x5d293c);};}function removeListener(_0x46506d,_0xaffaa0){return function(){WhatsappMessageEvents[_0x89f5('0x5')](_0x46506d,_0xaffaa0);};}exports[_0x89f5('0x6')]=function(_0x18b31b){for(var _0x35b5be=0x0,_0x2872b5=events[_0x89f5('0x7')];_0x35b5be<_0x2872b5;_0x35b5be++){var _0x34847a=events[_0x35b5be];var _0x1fc48e=createListener(_0x89f5('0x8')+_0x34847a,_0x18b31b);WhatsappMessageEvents['on'](_0x34847a,_0x1fc48e);}};