Also check instances to skip

This commit is contained in:
Natty 2023-08-16 01:21:28 +02:00 committed by Laura Hausmann
parent 37c4ef56d7
commit 63b179c178
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -126,7 +126,14 @@ export default class DeliverManager {
const instancesToSkip = await skippedInstances( const instancesToSkip = await skippedInstances(
// get (unique) list of hosts // get (unique) list of hosts
Array.from( Array.from(
new Set(Array.from(inboxes).map((inbox) => new URL(inbox).host)), new Set(Array.from(inboxes).map((inbox) => {
try {
return new URL(inbox).host;
} catch (e) {
apLogger.error(`Invalid inbox URL: ${inbox}`);
return null;
}
} ).filter((host) => host != null) as string[]),
), ),
); );