Class TeamInvitation
What an invite code resolves to. Everything an invitation screen needs, and nothing more.
public sealed record TeamInvitation : IEquatable<TeamInvitation>
- Inheritance
-
TeamInvitation
- Implements
- Inherited Members
Constructors
TeamInvitation(string, string, string, bool)
What an invite code resolves to. Everything an invitation screen needs, and nothing more.
public TeamInvitation(string TeamKey, string TeamName, string EMail, bool AlreadyMember)
Parameters
TeamKeystringThe team the invitation is for.
TeamNamestringIts display name.
EMailstringThe address the invitation was sent to.
AlreadyMemberboolTrue when the caller is already an accepted member of this team, so the screen can say so instead of offering to join twice.
Properties
AlreadyMember
True when the caller is already an accepted member of this team, so the screen can say so instead of offering to join twice.
public bool AlreadyMember { get; init; }
Property Value
The address the invitation was sent to.
public string EMail { get; init; }
Property Value
InviteKey
The code to hand back when accepting or declining.
public string InviteKey { get; init; }
Property Value
Remarks
Here so the acceptance screen never has to decode the link itself. It used to unpack the base64 payload a second time to find the code, which made the link format something two places knew about — and the second place would have broken the moment the format changed. Resolving already produces the code, so handing it back costs nothing.
Discloses nothing: the caller presented this code to get here.
Status
Whether the invitation can still be accepted.
public InvitationStatus Status { get; init; }
Property Value
Remarks
An init-only property rather than a fifth positional parameter, so a host that constructs or deconstructs this record keeps compiling.
Reporting expiry discloses nothing. The caller reached this by presenting a code that resolved,
so they already hold a real invitation and are being shown the team's name beside it. Telling them it
expired is the difference between "ask for a new link" and retrying a code that will never work. A code
that is malformed or unknown still resolves to null, indistinguishably, because that answer
would be given to someone who guessed.
TeamKey
The team the invitation is for.
public string TeamKey { get; init; }
Property Value
TeamName
Its display name.
public string TeamName { get; init; }