Built motion from commit 43538d75.|2.5.35
[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 _0x64b0=['register','whatsappQueue:','remove','update'];(function(_0x226e48,_0x4f24e7){var _0x107fe0=function(_0x26bfe9){while(--_0x26bfe9){_0x226e48['push'](_0x226e48['shift']());}};_0x107fe0(++_0x4f24e7);}(_0x64b0,0x86));var _0x064b=function(_0x11a522,_0x17a7ec){_0x11a522=_0x11a522-0x0;var _0x34baf1=_0x64b0[_0x11a522];return _0x34baf1;};'use strict';var WhatsappQueueEvents=require('./whatsappQueue.events');var events=['save',_0x064b('0x0'),_0x064b('0x1')];function createListener(_0x193b05,_0x45c0e1){return function(_0x337055){_0x45c0e1['emit'](_0x193b05,_0x337055);};}function removeListener(_0x4bfc23,_0x2caa4e){return function(){WhatsappQueueEvents['removeListener'](_0x4bfc23,_0x2caa4e);};}exports[_0x064b('0x2')]=function(_0x434698){for(var _0x31ddca=0x0,_0x5a0d8f=events['length'];_0x31ddca<_0x5a0d8f;_0x31ddca++){var _0x5a15f7=events[_0x31ddca];var _0x1cd224=createListener(_0x064b('0x3')+_0x5a15f7,_0x434698);WhatsappQueueEvents['on'](_0x5a15f7,_0x1cd224);}};