feat: add participant-scoped proposal recovery

This commit is contained in:
Josh Creek
2026-08-31 22:41:26 +01:00
parent 550d73f1d7
commit 66a67c931d
6 changed files with 85 additions and 6 deletions
+7
View File
@@ -135,6 +135,13 @@ func (p *Proposal) participantIndex(playerID string) int {
return -1
}
// HasParticipant is the read-side authorization check for proposal recovery.
// A proposal contains private matchmaking state, so non-participants must not
// be able to enumerate or observe it through the control plane.
func (p *Proposal) HasParticipant(playerID string) bool {
return p != nil && playerID != "" && p.participantIndex(playerID) >= 0
}
func (p *Proposal) allAccepted() bool {
for _, participant := range p.Participants {
if participant.Response != AcceptedResponse {