Built motion from commit (unavailable).|2.5.3
[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 _0xf741=['MailAccount','update','remove','emit','hook','exports','events','../../mysqldb'];(function(_0x172f28,_0x595347){var _0x217ac6=function(_0x296ce7){while(--_0x296ce7){_0x172f28['push'](_0x172f28['shift']());}};_0x217ac6(++_0x595347);}(_0xf741,0xb6));var _0x1f74=function(_0x27f155,_0xed1c35){_0x27f155=_0x27f155-0x0;var _0x4030c1=_0xf741[_0x27f155];return _0x4030c1;};'use strict';var EventEmitter=require(_0x1f74('0x0'));var MailAccount=require(_0x1f74('0x1'))['db'][_0x1f74('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x1f74('0x3'),'afterDestroy':_0x1f74('0x4')};function emitEvent(_0x1f732e){return function(_0x516911,_0x40f151,_0x74125f){MailAccountEvents[_0x1f74('0x5')](_0x1f732e+':'+_0x516911['id'],_0x516911);MailAccountEvents[_0x1f74('0x5')](_0x1f732e,_0x516911);_0x74125f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailAccount[_0x1f74('0x6')](e,emitEvent(event));}}module[_0x1f74('0x7')]=MailAccountEvents;