remove invalid ...
This commit is contained in:
parent
603299a2f7
commit
22ca7eb94b
|
|
@ -129,7 +129,23 @@ async function syncEmailsForDomainOptimized(domainId: number, bucket: string, s3
|
|||
{ retries: 3 }
|
||||
);
|
||||
|
||||
allS3Keys.push(...(response.Contents?.map(obj => obj.Key!).filter(Boolean) || []));
|
||||
// Filtere Amazon SES System-Nachrichten und andere nicht-E-Mail-Objekte
|
||||
const validKeys = response.Contents?.map(obj => obj.Key!)
|
||||
.filter(key => {
|
||||
// Filtere bekannte System-Nachrichten von Amazon SES
|
||||
if (key === 'AMAZON_SES_SETUP_NOTIFICATION') {
|
||||
console.log(`Skipping AWS system notification: ${key}`);
|
||||
return false;
|
||||
}
|
||||
// Filtere andere potenzielle System-Dateien
|
||||
if (key.startsWith('AMAZON_') || key.startsWith('.')) {
|
||||
console.log(`Skipping system file: ${key}`);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}) || [];
|
||||
|
||||
allS3Keys.push(...validKeys);
|
||||
continuationToken = response.NextContinuationToken;
|
||||
} while (continuationToken);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue