publish: mirror TS6's pending-join model instead of refusing

Live testing against a real TS6 client settled how both settings actually
behave, and neither is what the previous commit assumed.

The server enforces nothing. It stores accessibility and viewer_limit,
echoes them back in notifystreamstarted, and then forwards every join
request anyway - a PRIVATE stream at viewer_limit=1 still had both
viewers announced to us. Enforcement is entirely the publisher's job.

And a refusal is the wrong tool for it. TS6's own rule, from main.js:

    !autoAccept || full ? pendingJoinRequests.push(...)
                        : joinStreamResponse(...)

A request it will not take automatically is left *pending*, not denied.
That matters because a denial does not stick - TS6 pairs its own deny
with a ban (blockAndDenyJoinRequest) precisely because of this - so a
refused client just asks again. Measured: 7 retries in 40 s, with nothing
shown to the person waiting. Left pending, the same client asks once and
displays "waiting for access" until answered, then connects normally.

So: PUBLIC with room to spare admits; anything else queues for the user,
including a full stream. Deny is now an explicit choice, and block is the
sticky variant. CONTACTS_ONLY behaves as PRIVATE because the contact list
is a TS6 account feature we cannot read.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
MoepchiandClaude Opus 5 committed 2026-09-11 05:26:33 +00:00
1 parent 4d0954054c
commit 13d3f56c89
4 files changed
+174 -15

No files matched your search

+52
View File
@@ -4111,3 +4111,55 @@
min-width: 160px;
}
}
/* A join request waiting for a decision. TS6 shows the viewer "waiting for
access" the whole time this is on screen, so it should not be subtle. */
.ts-stream-request {
display: flex;
align-items: center;
gap: 0.4rem;
padding: 0.45rem 0.55rem;
border-top: 1px solid var(--ts-border, #2a2f3a);
background: var(--ts-accent-soft, rgba(90, 140, 255, 0.12));
font-size: 0.82rem;
}
.ts-stream-request-who {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ts-stream-request-who em {
opacity: 0.7;
font-size: 0.75rem;
font-style: normal;
}
.ts-stream-request button {
flex: none;
padding: 0.2rem 0.5rem;
border: 1px solid var(--ts-border, #2a2f3a);
border-radius: 4px;
background: var(--ts-surface, #1b1f27);
color: inherit;
cursor: pointer;
font-size: 0.78rem;
}
.ts-stream-request button:hover {
border-color: var(--ts-accent, #5a8cff);
}
.ts-stream-request-allow {
background: var(--ts-accent, #5a8cff) !important;
color: #fff;
}
.ts-stream-request-block {
opacity: 0.65;
}