~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

A failed membership write after redeeming loses the invite

Closed
Closed chadtmiller.com opened this issue 0 comments

What happened

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.