Built motion from commit (unavailable).|2.5.30
[motion2.git] / server / api / mailAccount / mailAccount.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 _0x513e=['save','emit','hasOwnProperty','hook','exports','events','../../mysqldb','MailAccount'];(function(_0x547e20,_0x284545){var _0x359171=function(_0x590250){while(--_0x590250){_0x547e20['push'](_0x547e20['shift']());}};_0x359171(++_0x284545);}(_0x513e,0xf5));var _0xe513=function(_0x48d6a3,_0x37c848){_0x48d6a3=_0x48d6a3-0x0;var _0x38bfa0=_0x513e[_0x48d6a3];return _0x38bfa0;};'use strict';var EventEmitter=require(_0xe513('0x0'));var MailAccount=require(_0xe513('0x1'))['db'][_0xe513('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe513('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x43cb16){return function(_0x104e34,_0x10d739,_0x37bc47){MailAccountEvents[_0xe513('0x4')](_0x43cb16+':'+_0x104e34['id'],_0x104e34);MailAccountEvents['emit'](_0x43cb16,_0x104e34);_0x37bc47(null);};}for(var e in events){if(events[_0xe513('0x5')](e)){var event=events[e];MailAccount[_0xe513('0x6')](e,emitEvent(event));}}module[_0xe513('0x7')]=MailAccountEvents;