From b307d4de038d73051d4034de47c7fd28163c7ed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 3 Jun 2025 11:23:46 +0400 Subject: [PATCH] Generate profile image for feeds if missing --- handlers/user-atom-feed.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/handlers/user-atom-feed.ts b/handlers/user-atom-feed.ts index 95fb3b6..ec345ca 100644 --- a/handlers/user-atom-feed.ts +++ b/handlers/user-atom-feed.ts @@ -4,6 +4,7 @@ import { fetchArticlesByAuthor, fetchProfileEvent } from "../nostr.ts"; import { profileAtomFeed } from "../feeds.ts"; import Profile from "../models/profile.ts"; import { notFoundHandler } from "../handlers/errors.ts"; +import { generateOgProfileImage } from "../magick.ts"; const userAtomFeedHandler = async function (ctx: Context) { const username = ctx.state.username; @@ -20,6 +21,7 @@ const userAtomFeedHandler = async function (ctx: Context) { const profile = new Profile(profileEvent, username); if (profile.nip05) { + await generateOgProfileImage(profile); const articles = await fetchArticlesByAuthor(pubkey, 10); const atom = await profileAtomFeed(profile, articles);