Skip to content

feat(invitations): add team_key_pubkey and invited_by_email to preview#31

Merged
alejandro-runner merged 1 commit intosynvya-stagingfrom
feat/invitation-preview-team-key-email
Apr 17, 2026
Merged

feat(invitations): add team_key_pubkey and invited_by_email to preview#31
alejandro-runner merged 1 commit intosynvya-stagingfrom
feat/invitation-preview-team-key-email

Conversation

@alejandro-runner
Copy link
Copy Markdown
Member

Summary

  • Adds team_key_pubkey (primary stored_keys pubkey, deterministic by id ASC) and invited_by_email (inviter's Keycast email) to GET /api/invitations/preview.
  • Both fields are Option<String> / nullable — shape stays stable when data is missing.
  • Additive change; existing clients unaffected.
  • Docs updated in docs/synvya/team-invite-by-email.md.

Closes #29.

Why

Lets the /accept-invite page render the team's kind-0 display name + avatar (via relays) and show the inviter as alejandro@synvya.com instead of f7ebfcf1….

Privacy note

invited_by_email exposes the inviter's email to whoever holds the 256-bit invite token. Acceptable because the inviter explicitly chose to invite this person, and the token is only delivered by email. Called out in the docs' Security section.

Test plan

  • cargo check -p keycast_api -p keycast_core passes
  • cargo test --lib in api/ — 57 passed
  • Manual: hit GET /api/invitations/preview?token=... against a staging invite and confirm both new fields appear with expected values
  • Manual: confirm teams with no stored key return team_key_pubkey: null rather than a 500

🤖 Generated with Claude Code

Lets the invitation landing page render the team's kind-0 profile
(display name + avatar) by pubkey and show the inviter's email instead
of a truncated pubkey. Closes #29.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alejandro-runner alejandro-runner merged commit 8c785ef into synvya-staging Apr 17, 2026
@alejandro-runner alejandro-runner deleted the feat/invitation-preview-team-key-email branch April 17, 2026 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Augment invitation preview with team_key_pubkey + invited_by_email

1 participant