Built motion from commit a61a4a20.|2.5.46
[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 _0x9ed6=['whatsappMessage:','./whatsappMessage.events','save','update','removeListener','length'];(function(_0x28f725,_0x5b6508){var _0x1f10e1=function(_0x454311){while(--_0x454311){_0x28f725['push'](_0x28f725['shift']());}};_0x1f10e1(++_0x5b6508);}(_0x9ed6,0xe5));var _0x69ed=function(_0x4229d3,_0x4b4f29){_0x4229d3=_0x4229d3-0x0;var _0x89ce0e=_0x9ed6[_0x4229d3];return _0x89ce0e;};'use strict';var WhatsappMessageEvents=require(_0x69ed('0x0'));var events=[_0x69ed('0x1'),'remove',_0x69ed('0x2')];function createListener(_0x32ecb6,_0x2882e8){return function(_0x53b4b6){_0x2882e8['emit'](_0x32ecb6,_0x53b4b6);};}function removeListener(_0x1608b9,_0xa70140){return function(){WhatsappMessageEvents[_0x69ed('0x3')](_0x1608b9,_0xa70140);};}exports['register']=function(_0x4d7a02){for(var _0x252b29=0x0,_0x342639=events[_0x69ed('0x4')];_0x252b29<_0x342639;_0x252b29++){var _0x13c2b8=events[_0x252b29];var _0x266aaa=createListener(_0x69ed('0x5')+_0x13c2b8,_0x4d7a02);WhatsappMessageEvents['on'](_0x13c2b8,_0x266aaa);}};