Built motion from commit 9d7072cc.|2.5.39
[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 _0x46aa=['whatsappQueue:','remove','removeListener','register','length'];(function(_0x533381,_0x8a69fa){var _0x2877ed=function(_0x45cb54){while(--_0x45cb54){_0x533381['push'](_0x533381['shift']());}};_0x2877ed(++_0x8a69fa);}(_0x46aa,0xd3));var _0xa46a=function(_0x4fbfd9,_0x3ab91a){_0x4fbfd9=_0x4fbfd9-0x0;var _0x31dc94=_0x46aa[_0x4fbfd9];return _0x31dc94;};'use strict';var WhatsappQueueEvents=require('./whatsappQueue.events');var events=['save',_0xa46a('0x0'),'update'];function createListener(_0x1acc54,_0x358998){return function(_0x31d1b0){_0x358998['emit'](_0x1acc54,_0x31d1b0);};}function removeListener(_0x2ee468,_0x5f04a9){return function(){WhatsappQueueEvents[_0xa46a('0x1')](_0x2ee468,_0x5f04a9);};}exports[_0xa46a('0x2')]=function(_0x4dfc0d){for(var _0x20f1bd=0x0,_0x4d319b=events[_0xa46a('0x3')];_0x20f1bd<_0x4d319b;_0x20f1bd++){var _0x5a92a7=events[_0x20f1bd];var _0x4461c3=createListener(_0xa46a('0x4')+_0x5a92a7,_0x4dfc0d);WhatsappQueueEvents['on'](_0x5a92a7,_0x4461c3);}};