Skip to content

Commit

Permalink
Hydrated missing actors for inbox items
Browse files Browse the repository at this point in the history
  • Loading branch information
allouis committed Sep 12, 2024
1 parent b437e67 commit 8f96a9e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ export async function inboxHandler(
thing.object = await db.get([thing.object]) ?? thing.object;
}

if (typeof thing.actor === 'string') {
thing.actor = await lookupActor(apCtx, thing.actor);
}

// Sanitize HTML content
if (thing.object && typeof thing.object !== 'string') {
thing.object.content = sanitizeHtml(thing.object.content, {
Expand Down

0 comments on commit 8f96a9e

Please sign in to comment.