Built motion from commit 753c950e.|2.5.42
[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 _0x0199=['whatsappQueue:','remove','update','emit','removeListener','register'];(function(_0x1392eb,_0x403a79){var _0x27e96d=function(_0x5a5a32){while(--_0x5a5a32){_0x1392eb['push'](_0x1392eb['shift']());}};_0x27e96d(++_0x403a79);}(_0x0199,0x1c9));var _0x9019=function(_0x17b823,_0x42c55c){_0x17b823=_0x17b823-0x0;var _0x3a6c61=_0x0199[_0x17b823];return _0x3a6c61;};'use strict';var WhatsappQueueEvents=require('./whatsappQueue.events');var events=['save',_0x9019('0x0'),_0x9019('0x1')];function createListener(_0x1b14a9,_0x3342e5){return function(_0x28e17e){_0x3342e5[_0x9019('0x2')](_0x1b14a9,_0x28e17e);};}function removeListener(_0x4a08f2,_0x2368a8){return function(){WhatsappQueueEvents[_0x9019('0x3')](_0x4a08f2,_0x2368a8);};}exports[_0x9019('0x4')]=function(_0x40c5e3){for(var _0x1796aa=0x0,_0xb5deb6=events['length'];_0x1796aa<_0xb5deb6;_0x1796aa++){var _0xe72ee9=events[_0x1796aa];var _0x58665a=createListener(_0x9019('0x5')+_0xe72ee9,_0x40c5e3);WhatsappQueueEvents['on'](_0xe72ee9,_0x58665a);}};