Built motion from commit 47436d59.|2.6.7
[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 _0x5ca8=['whatsappQueue:','./whatsappQueue.events','save','remove','emit','removeListener','length'];(function(_0x1ff12f,_0xb5acf5){var _0x4b1a01=function(_0x374f88){while(--_0x374f88){_0x1ff12f['push'](_0x1ff12f['shift']());}};_0x4b1a01(++_0xb5acf5);}(_0x5ca8,0xb7));var _0x85ca=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x5ca8[_0x19950b];return _0x3c6b41;};'use strict';var WhatsappQueueEvents=require(_0x85ca('0x0'));var events=[_0x85ca('0x1'),_0x85ca('0x2'),'update'];function createListener(_0x495b6b,_0x2d0130){return function(_0x2ca4f0){_0x2d0130[_0x85ca('0x3')](_0x495b6b,_0x2ca4f0);};}function removeListener(_0x135e34,_0xb21e95){return function(){WhatsappQueueEvents[_0x85ca('0x4')](_0x135e34,_0xb21e95);};}exports['register']=function(_0x495d89){for(var _0x2a40ca=0x0,_0xfea18c=events[_0x85ca('0x5')];_0x2a40ca<_0xfea18c;_0x2a40ca++){var _0x2bbcc8=events[_0x2a40ca];var _0x5924a2=createListener(_0x85ca('0x6')+_0x2bbcc8,_0x495d89);WhatsappQueueEvents['on'](_0x2bbcc8,_0x5924a2);}};