Operator-branded OpenGraph share cards#107
Open
ashwin47 wants to merge 4 commits into
Open
Conversation
…quare logos in the OG card
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Shared links to a Sabha instance now unfurl with the operator's own identity instead of a Sabha marketing image. When someone pastes their community's link into Slack, Discord, or iMessage, the preview card shows the operator's uploaded logo (or the Sabha mark as a fallback) above their account name, on a clean brand background with a small "powered by sabha" footer.
Why
The
og:imagetag previously hardcoded a sabha.co marketing image on every self-hosted and in-app surface. A self-hoster who had set their own app name, theme, and logo still saw a literal sabha.co ad on the one surface that matters most — the share card a prospective member sees first. The card is now rendered per-instance so it reflects whoever owns the surface.How it works
og:imagepoints at a new account-scoped endpoint that renders a 1200×630 PNG on the fly via libvips (the same image stack already used for logo variants — no ImageMagick dependency).Current.accountresolves the right identity automatically: the singleton account when self-hosted, the workspace account when running multi-tenant. The same code path therefore produces the operator's name on self-hosted and the workspace name inside a SaaS workspace.updated_at-based cache-buster, mirroring the existing logo endpoint.Testing