49d6109936865aa0a9cf27a3bf57125b8bbe9d2d
[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 _0x7c11=['removeListener','length','whatsappInteraction:','./whatsappInteraction.events','save','remove','update','emit'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0x7c11,0x13b));var _0x17c1=function(_0x1dcc0b,_0x1a3adf){_0x1dcc0b=_0x1dcc0b-0x0;var _0x20c233=_0x7c11[_0x1dcc0b];return _0x20c233;};'use strict';var WhatsappInteractionEvents=require(_0x17c1('0x0'));var events=[_0x17c1('0x1'),_0x17c1('0x2'),_0x17c1('0x3')];function createListener(_0x259a06,_0x25b763){return function(_0x3139ee){_0x25b763[_0x17c1('0x4')](_0x259a06,_0x3139ee);};}function removeListener(_0x1e9f3b,_0x2a70a0){return function(){WhatsappInteractionEvents[_0x17c1('0x5')](_0x1e9f3b,_0x2a70a0);};}exports['register']=function(_0x50309c){for(var _0x8ed85e=0x0,_0x3b4917=events[_0x17c1('0x6')];_0x8ed85e<_0x3b4917;_0x8ed85e++){var _0x4bb377=events[_0x8ed85e];var _0x47fa26=createListener(_0x17c1('0x7')+_0x4bb377,_0x50309c);WhatsappInteractionEvents['on'](_0x4bb377,_0x47fa26);}};