Skip to content

Commit b6bf3b1

Browse files
icecrasher321claude
andcommitted
fix(invitations): send the disclosure token for no-join previews too
A preview that predicted no join still tells the user nothing moves — the empty disclosed set is now echoed on accept, so a join that becomes possible between preview and accept (left another org, billing turned usable, grants un-staled) conflicts with disclosure-outdated instead of sweeping workspaces without a rendered notice. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 3e732dc commit b6bf3b1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

apps/sim/app/invite/[id]/invite.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,12 @@ export default function Invite() {
272272
token: token ?? undefined,
273273
/**
274274
* Disclosure token: acceptance rejects with disclosure-outdated if
275-
* the sweep set no longer matches what this screen showed.
275+
* the sweep set no longer matches what this screen showed. Sent
276+
* whenever a preview rendered — a no-join preview means the user
277+
* was shown that nothing moves (an empty disclosed set), which
278+
* must also conflict if acceptance would sweep anything.
276279
*/
277-
disclosedWorkspaceIds: joinPreview?.willJoinOrganization
278-
? joinPreview.workspaceIdsToMove
279-
: undefined,
280+
disclosedWorkspaceIds: joinPreview ? joinPreview.workspaceIdsToMove : undefined,
280281
},
281282
})
282283

0 commit comments

Comments
 (0)