1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0xe6c5=['emit','hasOwnProperty','hook','exports','events','setMaxListeners','save','update','remove'];(function(_0x5dae37,_0x2e2036){var _0x1b2721=function(_0x208c5d){while(--_0x208c5d){_0x5dae37['push'](_0x5dae37['shift']());}};_0x1b2721(++_0x2e2036);}(_0xe6c5,0x67));var _0x5e6c=function(_0x558389,_0x45690f){_0x558389=_0x558389-0x0;var _0x277765=_0xe6c5[_0x558389];return _0x277765;};'use strict';var EventEmitter=require(_0x5e6c('0x0'));var MailAccount=require('../../mysqldb')['db']['MailAccount'];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0x5e6c('0x1')](0x0);var events={'afterCreate':_0x5e6c('0x2'),'afterUpdate':_0x5e6c('0x3'),'afterDestroy':_0x5e6c('0x4')};function emitEvent(_0x56e3e3){return function(_0x29480c,_0x243866,_0x2e4a67){MailAccountEvents[_0x5e6c('0x5')](_0x56e3e3+':'+_0x29480c['id'],_0x29480c);MailAccountEvents['emit'](_0x56e3e3,_0x29480c);_0x2e4a67(null);};}for(var e in events){if(events[_0x5e6c('0x6')](e)){var event=events[e];MailAccount[_0x5e6c('0x7')](e,emitEvent(event));}}module[_0x5e6c('0x8')]=MailAccountEvents;