Built motion from commit 87cd5f02.|2.5.48
[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 _0x492f=['removeListener','register','length','whatsappMessage:','save','remove','update'];(function(_0xf01961,_0x17c74f){var _0xd983c4=function(_0x62a217){while(--_0x62a217){_0xf01961['push'](_0xf01961['shift']());}};_0xd983c4(++_0x17c74f);}(_0x492f,0x177));var _0xf492=function(_0x531024,_0x1f7b49){_0x531024=_0x531024-0x0;var _0x1ef79b=_0x492f[_0x531024];return _0x1ef79b;};'use strict';var WhatsappMessageEvents=require('./whatsappMessage.events');var events=[_0xf492('0x0'),_0xf492('0x1'),_0xf492('0x2')];function createListener(_0x47e869,_0xa9b201){return function(_0x4eef5a){_0xa9b201['emit'](_0x47e869,_0x4eef5a);};}function removeListener(_0x122169,_0x3c56e9){return function(){WhatsappMessageEvents[_0xf492('0x3')](_0x122169,_0x3c56e9);};}exports[_0xf492('0x4')]=function(_0x115d3c){for(var _0xcdfd32=0x0,_0x3c22f6=events[_0xf492('0x5')];_0xcdfd32<_0x3c22f6;_0xcdfd32++){var _0xce7feb=events[_0xcdfd32];var _0x1be74a=createListener(_0xf492('0x6')+_0xce7feb,_0x115d3c);WhatsappMessageEvents['on'](_0xce7feb,_0x1be74a);}};