Built motion from commit (unavailable).|2.5.29
[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 _0x0aaf=['./whatsappQueue.events','save','remove','update','removeListener','length'];(function(_0x12d68b,_0x3c5bdf){var _0x532546=function(_0x2ac9c9){while(--_0x2ac9c9){_0x12d68b['push'](_0x12d68b['shift']());}};_0x532546(++_0x3c5bdf);}(_0x0aaf,0x90));var _0xf0aa=function(_0x5b4c44,_0x2e495e){_0x5b4c44=_0x5b4c44-0x0;var _0x58485a=_0x0aaf[_0x5b4c44];return _0x58485a;};'use strict';var WhatsappQueueEvents=require(_0xf0aa('0x0'));var events=[_0xf0aa('0x1'),_0xf0aa('0x2'),_0xf0aa('0x3')];function createListener(_0x4a5d9e,_0x4eb543){return function(_0x3ef88b){_0x4eb543['emit'](_0x4a5d9e,_0x3ef88b);};}function removeListener(_0x323112,_0x27c339){return function(){WhatsappQueueEvents[_0xf0aa('0x4')](_0x323112,_0x27c339);};}exports['register']=function(_0x16903c){for(var _0x239c6a=0x0,_0x4f8327=events[_0xf0aa('0x5')];_0x239c6a<_0x4f8327;_0x239c6a++){var _0x580faf=events[_0x239c6a];var _0x127438=createListener('whatsappQueue:'+_0x580faf,_0x16903c);WhatsappQueueEvents['on'](_0x580faf,_0x127438);}};