diff --git a/src/remote/activitypub/models/note.ts b/src/remote/activitypub/models/note.ts index 32ea13e6f8..76b66a07c3 100644 --- a/src/remote/activitypub/models/note.ts +++ b/src/remote/activitypub/models/note.ts @@ -55,7 +55,13 @@ export async function createNote(value: any, resolver?: Resolver, silent = false const object = await resolver.resolve(value) as any; if (object == null || object.type !== 'Note') { - logger.error(`invalid note: ${object}`); + logger.error(`invalid note: ${value}`, { + resolver: { + history: resolver.getHistory() + }, + value: value, + object: object + }); return null; } diff --git a/src/remote/activitypub/resolver.ts b/src/remote/activitypub/resolver.ts index 0c435cf916..6291d133e9 100644 --- a/src/remote/activitypub/resolver.ts +++ b/src/remote/activitypub/resolver.ts @@ -13,6 +13,10 @@ export default class Resolver { this.history = new Set(); } + public getHistory(): string[] { + return Array.from(this.history); + } + public async resolveCollection(value: any) { const collection = typeof value === 'string' ? await this.resolve(value)