Built motion from commit (unavailable).|2.5.23
[motion2.git] / server / api / mailQueue / mailQueue.events.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 _0x989f=['../../mysqldb','MailQueue','save','update','remove','emit','hasOwnProperty','exports','events'];(function(_0x426b30,_0x1b9f71){var _0x126b84=function(_0xaf3b1f){while(--_0xaf3b1f){_0x426b30['push'](_0x426b30['shift']());}};_0x126b84(++_0x1b9f71);}(_0x989f,0xaa));var _0xf989=function(_0xaa4529,_0x236935){_0xaa4529=_0xaa4529-0x0;var _0x3af830=_0x989f[_0xaa4529];return _0x3af830;};'use strict';var EventEmitter=require(_0xf989('0x0'));var MailQueue=require(_0xf989('0x1'))['db'][_0xf989('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf989('0x3'),'afterUpdate':_0xf989('0x4'),'afterDestroy':_0xf989('0x5')};function emitEvent(_0x14aeca){return function(_0x1d8309,_0x1f20f5,_0xa81a0d){MailQueueEvents[_0xf989('0x6')](_0x14aeca+':'+_0x1d8309['id'],_0x1d8309);MailQueueEvents['emit'](_0x14aeca,_0x1d8309);_0xa81a0d(null);};}for(var e in events){if(events[_0xf989('0x7')](e)){var event=events[e];MailQueue['hook'](e,emitEvent(event));}}module[_0xf989('0x8')]=MailQueueEvents;