Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / api / mailQueue / mailQueue.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 _0xa1d0=['./mailQueue.events','remove','emit','removeListener','register','length','mailQueue:'];(function(_0x15721c,_0x4d29c8){var _0x45183e=function(_0x285068){while(--_0x285068){_0x15721c['push'](_0x15721c['shift']());}};_0x45183e(++_0x4d29c8);}(_0xa1d0,0x1a4));var _0x0a1d=function(_0x5a3263,_0x30ffe7){_0x5a3263=_0x5a3263-0x0;var _0x13f78b=_0xa1d0[_0x5a3263];return _0x13f78b;};'use strict';var MailQueueEvents=require(_0x0a1d('0x0'));var events=['save',_0x0a1d('0x1'),'update'];function createListener(_0xfe1b50,_0x1c1b1f){return function(_0x374ec2){_0x1c1b1f[_0x0a1d('0x2')](_0xfe1b50,_0x374ec2);};}function removeListener(_0x15e254,_0x2d2b14){return function(){MailQueueEvents[_0x0a1d('0x3')](_0x15e254,_0x2d2b14);};}exports[_0x0a1d('0x4')]=function(_0x285114){for(var _0x3b5b3c=0x0,_0x79fbcd=events[_0x0a1d('0x5')];_0x3b5b3c<_0x79fbcd;_0x3b5b3c++){var _0x466225=events[_0x3b5b3c];var _0x2aed72=createListener(_0x0a1d('0x6')+_0x466225,_0x285114);MailQueueEvents['on'](_0x466225,_0x2aed72);}};