1d9f121140af36a5e94017d0f99ec9c3fb927e6d
[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 _0x2ef7=['length','./whatsappQueue.events','emit','register'];(function(_0x1d230d,_0x312764){var _0x284ee9=function(_0x4ffde8){while(--_0x4ffde8){_0x1d230d['push'](_0x1d230d['shift']());}};_0x284ee9(++_0x312764);}(_0x2ef7,0x1f1));var _0x72ef=function(_0x58b47a,_0x444c72){_0x58b47a=_0x58b47a-0x0;var _0x5e9eba=_0x2ef7[_0x58b47a];return _0x5e9eba;};'use strict';var WhatsappQueueEvents=require(_0x72ef('0x0'));var events=['save','remove','update'];function createListener(_0x11e308,_0x1208b5){return function(_0x4857ad){_0x1208b5[_0x72ef('0x1')](_0x11e308,_0x4857ad);};}function removeListener(_0x3a18fe,_0x5b17d3){return function(){WhatsappQueueEvents['removeListener'](_0x3a18fe,_0x5b17d3);};}exports[_0x72ef('0x2')]=function(_0x1d728f){for(var _0x50a93b=0x0,_0x908ec7=events[_0x72ef('0x3')];_0x50a93b<_0x908ec7;_0x50a93b++){var _0x41f830=events[_0x50a93b];var _0x1b298e=createListener('whatsappQueue:'+_0x41f830,_0x1d728f);WhatsappQueueEvents['on'](_0x41f830,_0x1b298e);}};