Built motion from commit da617fac.|2.6.6
[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 _0x13b3=['register','./whatsappQueue.events','save'];(function(_0x13a0fb,_0x3ea601){var _0x1526d3=function(_0x528702){while(--_0x528702){_0x13a0fb['push'](_0x13a0fb['shift']());}};_0x1526d3(++_0x3ea601);}(_0x13b3,0x13c));var _0x313b=function(_0x4fc80b,_0xfe1b3d){_0x4fc80b=_0x4fc80b-0x0;var _0x119dba=_0x13b3[_0x4fc80b];return _0x119dba;};'use strict';var WhatsappQueueEvents=require(_0x313b('0x0'));var events=[_0x313b('0x1'),'remove','update'];function createListener(_0x43f5ba,_0x350b50){return function(_0x36d62c){_0x350b50['emit'](_0x43f5ba,_0x36d62c);};}function removeListener(_0x521950,_0x42bae5){return function(){WhatsappQueueEvents['removeListener'](_0x521950,_0x42bae5);};}exports[_0x313b('0x2')]=function(_0x629149){for(var _0x33ee9a=0x0,_0x308e78=events['length'];_0x33ee9a<_0x308e78;_0x33ee9a++){var _0x2fea37=events[_0x33ee9a];var _0x12fa91=createListener('whatsappQueue:'+_0x2fea37,_0x629149);WhatsappQueueEvents['on'](_0x2fea37,_0x12fa91);}};