Playing around with stuff

This commit is contained in:
J Francisco Rader authored and J Francisco Rader committed 2021-03-30 02:07:56 -03:00
1 parent 282e99df18
commit 04670233bc
9 files changed
+98 -37

No files matched your search

+1
View File
@@ -11,6 +11,7 @@ import './sv_photo';
import './sv_messages';
import './sv_match';
import './sv_call';
import './sv_email';
import './players/sv_player_events';
import { mainLogger } from './sv_logger';
+3 -2
View File
@@ -120,12 +120,13 @@ onNet(events.EMAIL_FETCH_INBOX, async () => {
try {
const email = '[email protected]';
const messages = await fetchInbox(email);
await new Promise((res) => setTimeout(res, 6000));
const inbox = getEmailsFromMessages(messages, email);
emitNet(events.EMAIL_FETCH_INBOX_SUCCESS, inbox);
emitNet(events.EMAIL_FETCH_INBOX_SUCCESS, _source, inbox);
} catch (e) {
emailLogger.error(`Failed to fetch email inbox, ${e.message}`, {
source: _source,
});
emitNet(events.EMAIL_FETCH_INBOX_ERROR, e);
emitNet(events.EMAIL_FETCH_INBOX_ERROR, _source, e);
}
});