Built motion from commit (unavailable).|2.5.10
[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 _0x75c6=['update','remove','hasOwnProperty','exports','../../mysqldb','MailQueue','setMaxListeners'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0x75c6,0x11c));var _0x675c=function(_0x40c25c,_0x25e8eb){_0x40c25c=_0x40c25c-0x0;var _0x43b5de=_0x75c6[_0x40c25c];return _0x43b5de;};'use strict';var EventEmitter=require('events');var MailQueue=require(_0x675c('0x0'))['db'][_0x675c('0x1')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0x675c('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x675c('0x3'),'afterDestroy':_0x675c('0x4')};function emitEvent(_0x2a6c34){return function(_0xf73791,_0x56ab3c,_0x442431){MailQueueEvents['emit'](_0x2a6c34+':'+_0xf73791['id'],_0xf73791);MailQueueEvents['emit'](_0x2a6c34,_0xf73791);_0x442431(null);};}for(var e in events){if(events[_0x675c('0x5')](e)){var event=events[e];MailQueue['hook'](e,emitEvent(event));}}module[_0x675c('0x6')]=MailQueueEvents;