Built motion from commit b5413ace.|2.6.9
[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 _0x865c=['whatsappMessage:','save','remove','update','emit','removeListener'];(function(_0x2f9d42,_0x497cfd){var _0x28a61c=function(_0x44e966){while(--_0x44e966){_0x2f9d42['push'](_0x2f9d42['shift']());}};_0x28a61c(++_0x497cfd);}(_0x865c,0x133));var _0xc865=function(_0x1d2846,_0x43c7fe){_0x1d2846=_0x1d2846-0x0;var _0x59ab37=_0x865c[_0x1d2846];return _0x59ab37;};'use strict';var WhatsappMessageEvents=require('./whatsappMessage.events');var events=[_0xc865('0x0'),_0xc865('0x1'),_0xc865('0x2')];function createListener(_0x1718b8,_0x4eab65){return function(_0xd17b11){_0x4eab65[_0xc865('0x3')](_0x1718b8,_0xd17b11);};}function removeListener(_0x20cc22,_0x5320c3){return function(){WhatsappMessageEvents[_0xc865('0x4')](_0x20cc22,_0x5320c3);};}exports['register']=function(_0x11e463){for(var _0x47c136=0x0,_0x266bb3=events['length'];_0x47c136<_0x266bb3;_0x47c136++){var _0x2ecfda=events[_0x47c136];var _0x41a261=createListener(_0xc865('0x5')+_0x2ecfda,_0x11e463);WhatsappMessageEvents['on'](_0x2ecfda,_0x41a261);}};