1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xaae5=['update','removeListener','length'];(function(_0x50f6e5,_0x151ccb){var _0x5988c5=function(_0x490a93){while(--_0x490a93){_0x50f6e5['push'](_0x50f6e5['shift']());}};_0x5988c5(++_0x151ccb);}(_0xaae5,0xf6));var _0x5aae=function(_0x517aab,_0x1d28a4){_0x517aab=_0x517aab-0x0;var _0x3e1747=_0xaae5[_0x517aab];return _0x3e1747;};'use strict';var WhatsappQueueEvents=require('./whatsappQueue.events');var events=['save','remove',_0x5aae('0x0')];function createListener(_0x15f173,_0x2512f3){return function(_0x4df9b0){_0x2512f3['emit'](_0x15f173,_0x4df9b0);};}function removeListener(_0x14eb06,_0x461eb4){return function(){WhatsappQueueEvents[_0x5aae('0x1')](_0x14eb06,_0x461eb4);};}exports['register']=function(_0x52da9d){for(var _0x251f44=0x0,_0x3df774=events[_0x5aae('0x2')];_0x251f44<_0x3df774;_0x251f44++){var _0x33a897=events[_0x251f44];var _0x5a0d2b=createListener('whatsappQueue:'+_0x33a897,_0x52da9d);WhatsappQueueEvents['on'](_0x33a897,_0x5a0d2b);}};