redeem deletes the invite (its inbox record and its host row) before put_membership runs. If the membership write fails, for example on a store error or a group switched off between the two, the request errors, the invite is spent, and the invitee isn't a member. Asking again then falls to the join policy: InviteRequired for an invite-only group.
How to see it
Read against docs/fresh at 4636e6d, the code at: group_join.rs:64-66. Paths are under crates/group-host/src unless they say otherwise. Severity: low.
What you expected
Write the membership first and take the invite back after. A leftover invite for a member is harmless, since requestJoin refuses members.
Where
The host, as built from 4636e6d. Found while checking the docs against the code.
What happened
redeemdeletes the invite (its inbox record and its host row) beforeput_membershipruns. If the membership write fails, for example on a store error or a group switched off between the two, the request errors, the invite is spent, and the invitee isn't a member. Asking again then falls to the join policy:InviteRequiredfor an invite-only group.How to see it
Read against
docs/freshat 4636e6d, the code at: group_join.rs:64-66. Paths are undercrates/group-host/srcunless they say otherwise. Severity: low.What you expected
Write the membership first and take the invite back after. A leftover invite for a member is harmless, since
requestJoinrefuses members.Where
The host, as built from 4636e6d. Found while checking the docs against the code.