This commit is contained in:
Kio-td 2023-02-11 06:13:55 -05:00
parent a0ca938fbd
commit e35f3eef56

View file

@ -115,6 +115,16 @@ export async function createNote(
logger.info(`Creating the Note: ${note.id}`); logger.info(`Creating the Note: ${note.id}`);
// Skip if note is made before 2007 (1yr before Fedi was created)
if (note.published) {
const DateChecker = new Date(note.published)
if (DateChecker.getFullYear() < 2007) {
logger.warn('Note somehow made before Activitypub was created; discarding');
return null;
}
}
// Fetch author // Fetch author
const actor = (await resolvePerson( const actor = (await resolvePerson(
getOneApId(note.attributedTo), getOneApId(note.attributedTo),