Built motion from commit 25580385.|2.6.2
[motion2.git] / server / api / whatsappQueue / whatsappQueue.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 _0xe4f1=['whatsappQueue:','./whatsappQueue.events','save','remove','removeListener','register','length'];(function(_0x5f3f88,_0x562baf){var _0xd08119=function(_0x42dbf7){while(--_0x42dbf7){_0x5f3f88['push'](_0x5f3f88['shift']());}};_0xd08119(++_0x562baf);}(_0xe4f1,0x174));var _0x1e4f=function(_0xf65c62,_0x412a98){_0xf65c62=_0xf65c62-0x0;var _0x1aee4b=_0xe4f1[_0xf65c62];return _0x1aee4b;};'use strict';var WhatsappQueueEvents=require(_0x1e4f('0x0'));var events=[_0x1e4f('0x1'),_0x1e4f('0x2'),'update'];function createListener(_0x2fe79e,_0x411095){return function(_0xbf4df3){_0x411095['emit'](_0x2fe79e,_0xbf4df3);};}function removeListener(_0x44d93b,_0x3a2628){return function(){WhatsappQueueEvents[_0x1e4f('0x3')](_0x44d93b,_0x3a2628);};}exports[_0x1e4f('0x4')]=function(_0x2f46ed){for(var _0x4db4c3=0x0,_0xd698d1=events[_0x1e4f('0x5')];_0x4db4c3<_0xd698d1;_0x4db4c3++){var _0x34f206=events[_0x4db4c3];var _0x32a99c=createListener(_0x1e4f('0x6')+_0x34f206,_0x2f46ed);WhatsappQueueEvents['on'](_0x34f206,_0x32a99c);}};