Built motion from commit 4c281f94.|2.6.31
[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 _0xa12a=['removeListener','register','length','save','remove','emit'];(function(_0x4d01a8,_0x2fafe7){var _0xd9f475=function(_0x47ff57){while(--_0x47ff57){_0x4d01a8['push'](_0x4d01a8['shift']());}};_0xd9f475(++_0x2fafe7);}(_0xa12a,0x105));var _0xaa12=function(_0x47b58b,_0x41a189){_0x47b58b=_0x47b58b-0x0;var _0x46bebe=_0xa12a[_0x47b58b];return _0x46bebe;};'use strict';var WhatsappQueueEvents=require('./whatsappQueue.events');var events=[_0xaa12('0x0'),_0xaa12('0x1'),'update'];function createListener(_0x428ec5,_0x2dcc36){return function(_0x189f67){_0x2dcc36[_0xaa12('0x2')](_0x428ec5,_0x189f67);};}function removeListener(_0x48e3ee,_0x26d3eb){return function(){WhatsappQueueEvents[_0xaa12('0x3')](_0x48e3ee,_0x26d3eb);};}exports[_0xaa12('0x4')]=function(_0x397677){for(var _0x1a6ab=0x0,_0x1af612=events[_0xaa12('0x5')];_0x1a6ab<_0x1af612;_0x1a6ab++){var _0x33aad0=events[_0x1a6ab];var _0x3e8340=createListener('whatsappQueue:'+_0x33aad0,_0x397677);WhatsappQueueEvents['on'](_0x33aad0,_0x3e8340);}};