diff --git a/src/dispatchers.ts b/src/dispatchers.ts index f8ad2fd0..c03fdb1d 100644 --- a/src/dispatchers.ts +++ b/src/dispatchers.ts @@ -2,6 +2,7 @@ import { Article, Accept, Follow, + Image, Person, RequestContext, lookupObject, @@ -37,7 +38,7 @@ async function getUserData(ctx: RequestContext, handle: string) { name: existing.name, summary: existing.summary, preferredUsername: existing.preferredUsername, - icon: new URL(existing.icon), + icon: new Image({ url: new URL(existing.icon) }), inbox: new URL(existing.inbox), outbox: new URL(existing.outbox), following: new URL(existing.following), @@ -53,7 +54,7 @@ async function getUserData(ctx: RequestContext, handle: string) { name: `Local Ghost site`, summary: 'This is a summary', preferredUsername: handle, - icon: new URL('https://ghost.org/favicon.ico'), + icon: new Image({ url: new URL('https://ghost.org/favicon.ico') }), inbox: ctx.getInboxUri(handle), outbox: ctx.getOutboxUri(handle), following: ctx.getFollowingUri(handle), @@ -68,7 +69,7 @@ async function getUserData(ctx: RequestContext, handle: string) { name: data.name, summary: data.summary, preferredUsername: data.preferredUsername, - icon: data.icon.href, + icon: data.icon.url!.href as string, inbox: data.inbox.href, outbox: data.outbox.href, following: data.following.href,