Forum: the "Alapító tag" badge for the first hundred members

The first hundred members (in the order they chose a nickname) keep it for
good; joining is serialised so there are never more than a hundred. Shown
next to the nickname in posts, author lines and profiles; the privacy
notice mentions it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012vLHzh5qUhFtmJhzkcTbXL
This commit is contained in:
feco
2026-11-26 15:43:24 +00:00
co-authored by Claude Opus 5.5
parent 863002c1e7
commit 8fc550662e
12 changed files with 64 additions and 10 deletions
+3 -1
View File
@@ -230,6 +230,7 @@ struct AuthorRow {
roles: Vec<String>,
listener: bool,
supporter: bool,
founder: bool,
}
/// How members appear next to what they wrote: nickname, avatar, rank,
@@ -243,7 +244,7 @@ pub async fn authors(db: &PgPool, ids: impl IntoIterator<Item = Uuid>) -> Result
}
let rows: Vec<AuthorRow> = sqlx::query_as(
"SELECT m.user_id, m.nickname, m.avatar, m.points, m.created_at, m.invisible, m.last_seen_at, \
m.chart_share, u.roles, m.listener, \
m.chart_share, u.roles, m.listener, m.founder, \
m.supporter_badge AND EXISTS (SELECT 1 FROM package_orders o \
WHERE o.user_id = m.user_id AND o.source = 'stripe') AS supporter \
FROM forum.members m JOIN users u ON u.id = m.user_id WHERE m.user_id = ANY($1)",
@@ -270,6 +271,7 @@ pub async fn authors(db: &PgPool, ids: impl IntoIterator<Item = Uuid>) -> Result
"signs": shown,
"listener": r.listener,
"supporter": r.supporter,
"founder": r.founder,
});
(r.user_id, value)
})