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 _0x1645=['length','whatsappQueue:','./whatsappQueue.events','save','emit'];(function(_0x2faa1a,_0x5bcc32){var _0x3f9dc7=function(_0x3f33b4){while(--_0x3f33b4){_0x2faa1a['push'](_0x2faa1a['shift']());}};_0x3f9dc7(++_0x5bcc32);}(_0x1645,0x75));var _0x5164=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1645[_0x3dd15e];return _0x231fd0;};'use strict';var WhatsappQueueEvents=require(_0x5164('0x0'));var events=[_0x5164('0x1'),'remove','update'];function createListener(_0x45feee,_0x513767){return function(_0x43b2a0){_0x513767[_0x5164('0x2')](_0x45feee,_0x43b2a0);};}function removeListener(_0x5b2647,_0x5f477f){return function(){WhatsappQueueEvents['removeListener'](_0x5b2647,_0x5f477f);};}exports['register']=function(_0x81bf6b){for(var _0x334679=0x0,_0x53aa5a=events[_0x5164('0x3')];_0x334679<_0x53aa5a;_0x334679++){var _0x1e82bd=events[_0x334679];var _0xa13a1=createListener(_0x5164('0x4')+_0x1e82bd,_0x81bf6b);WhatsappQueueEvents['on'](_0x1e82bd,_0xa13a1);}};