SkateSpots/src/lib/admins.ts
shakespeare.diy 8b080fb7f1 Spot detail: make mapper clickable + add Message Mapper button
The "Tip the Mapper" card now links the avatar/name to the mapper's profile
(/{npub} via the NIP-19 router) and adds a "Message Mapper" button that opens
an encrypted DM (/messages/{npub}). Makes it easy to contact whoever added a
spot — e.g. to ask them to add photos to a photoless submission. The message
button is hidden when you're viewing your own spot.

Co-authored-by: shakespeare.diy <assistant@shakespeare.diy>
2026-08-15 10:03:58 +07:00

22 lines
1 KiB
TypeScript

// ─── SkateSpots admin identities ────────────────────────────────────────────
//
// Single source of truth for who counts as an "admin" across the app
// (newsletter publishing, relay admin dashboard, etc.).
//
// Pubkeys are stored in HEX because that's what `user.pubkey` and Nostr
// filters use. The bech32 npub is kept in a comment for human readability.
/** Hex pubkeys of SkateSpots admins. */
export const ADMIN_PUBKEYS: string[] = [
// SkateSpots founder
// npub1yrnuj56rnen08zp2h9h7p74ghgjx6ma39spmpj6w9hzxywutevsst7k5cx
'20e7c953439e66f3882ab96fe0faa8ba246d6fb12c03b0cb4e2dc4623b8bcb21',
// npub1e2ayjlmmaksx2rtt0z4jzyskunfwh2lwe89xav4qtnhgu4wxsudsp98a4l
'caba497f7beda0650d6b78ab211216e4d2ebabeec9ca6eb2a05cee8e55c6871b',
];
/** Returns true if the given hex pubkey belongs to a SkateSpots admin. */
export function isAdminPubkey(pubkey: string | undefined | null): boolean {
if (!pubkey) return false;
return ADMIN_PUBKEYS.includes(pubkey);
}