mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-13 08:32:15 +00:00
fix: bind queue candidates to their owner
This commit is contained in:
@@ -62,7 +62,7 @@ func (q *Queue) Create(playerID, ticketID, idempotencyKey string, candidate Cand
|
||||
}
|
||||
return prior.ticket, nil
|
||||
}
|
||||
if idempotencyKey == "" || playerID == "" || ticketID == "" || candidate.TicketID != ticketID {
|
||||
if idempotencyKey == "" || playerID == "" || ticketID == "" || candidate.TicketID != ticketID || candidate.PlayerID != playerID {
|
||||
return QueueTicket{}, fmt.Errorf("%w: invalid queue create", ErrConflict)
|
||||
}
|
||||
if _, ok := q.byPlayer[playerID]; ok {
|
||||
|
||||
Reference in New Issue
Block a user