feat: improve og invite preview #227
Reference in New Issue
Block a user
Delete Branch "priyanshu_bharti/flotilla:feature/improve-og-invite-preview"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR moves invite link previews to server-side Open Graph generation so invite links unfurl correctly everywhere, not just inside Flotilla.
What changed
Testing
I don't love this approach. Some comments:
app/util/title.ts. We should cover all those cases, and when the url is parameterized, fetch information from the relay's nip 11 (or from nostr) so we can display it. So for example,/space/meta.spaces.coracle.social/eykoushuda1should have an og title of something like "Coracle Spaces / Hosting" to match the room name.@@ -0,0 +21,4 @@"Flotilla is nostr - for communities.",url: readMetaContent(indexHtml, "og:url") || "",image: readMetaContent(indexHtml, "twitter:image") || "/maskable-icon-512x512.png",}Remove the defaults, just assert they're non-null and make sure they exist in the app html
@@ -0,0 +44,4 @@".webmanifest": "application/manifest+json; charset=utf-8",".woff": "font/woff",".woff2": "font/woff2",}This seems unnecessary, couldn't we delegate this to a framework? i.e. use hono to serve static files and only do the opengraph stuff if we're falling back to index.
@@ -0,0 +65,4 @@sendText(res, "ok", "text/plain; charset=utf-8", headOnly)return}We don't need this
88bb278adcto382056c6baPull request closed