formatting code (#206)

Co-authored-by: Wayne <5291640+ringoinca@users.noreply.github.com>
This commit is contained in:
Wei S.
2025-10-28 13:35:53 +01:00
committed by GitHub
parent ddb4d56107
commit 0cff788656
4 changed files with 11 additions and 7 deletions

View File

@@ -95,7 +95,9 @@ export class IndexingService {
const batchDocuments = await Promise.allSettled(
batch.map(async (pendingEmail) => {
try {
const document = await this.indexEmailById(pendingEmail.archivedEmailId);
const document = await this.indexEmailById(
pendingEmail.archivedEmailId
);
if (document) {
return document;
}
@@ -119,7 +121,10 @@ export class IndexingService {
} else if (result.status === 'rejected') {
logger.error({ error: result.reason }, 'Failed to process email in batch');
} else {
logger.error({ result: result }, 'Failed to process email in batch, reason unknown.');
logger.error(
{ result: result },
'Failed to process email in batch, reason unknown.'
);
}
}
}

View File

@@ -186,7 +186,7 @@ export class IngestionService {
(key) =>
key !== 'providerConfig' &&
originalSource[key as keyof IngestionSource] !==
decryptedSource[key as keyof IngestionSource]
decryptedSource[key as keyof IngestionSource]
);
if (changedFields.length > 0) {
await this.auditService.createAuditLog({

View File

@@ -117,7 +117,7 @@ export class StorageService implements IStorageProvider {
if (!prefix.equals(ENCRYPTION_PREFIX)) {
// File is not encrypted, return a new stream containing the buffered prefix and the rest of the original stream
const combinedStream = new Readable({
read() { },
read() {},
});
combinedStream.push(prefixAndIvBuffer);
stream.on('data', (chunk) => {

View File

@@ -139,7 +139,6 @@ export class PSTConnector implements IEmailConnector {
if (!fileExist) {
throw Error('PST file upload not finished yet, please wait.');
}
return true;
} catch (error) {
logger.error({ error, credentials: this.credentials }, 'PST file validation failed.');
@@ -289,8 +288,8 @@ export class PSTConnector implements IEmailConnector {
emlBuffer ?? Buffer.from(parsedEmail.text || parsedEmail.html || '', 'utf-8')
)
.digest('hex')}-${createHash('sha256')
.update(emlBuffer ?? Buffer.from(msg.subject || '', 'utf-8'))
.digest('hex')}-${msg.clientSubmitTime?.getTime()}`;
.update(emlBuffer ?? Buffer.from(msg.subject || '', 'utf-8'))
.digest('hex')}-${msg.clientSubmitTime?.getTime()}`;
}
return {
id: messageId,