VoiceOver and TalkBack read every native avatar on their own, even where
the name is shown right next to it, and the web change left native out.
Give the native StatelessAvatar the same behaviour: decorative by
default, and announced with the person's name only where a caller sets
accessibilityAnnounceName, so both platforms follow one rule.
The pre-join preview shows the participant's avatar with alt="avatar"
when the camera is off, so screen reader users hear a generic word
instead of who the picture shows. An external WCAG 2.2 AA audit of a
JaaS embed flagged this (1.1.1 Non-text Content).
Avatars stay decorative by default, because nearly every other place
renders the name right next to them and would otherwise read it twice.
The pre-join preview opts in with accessibilityAnnounceName, and the
same name is used for the picture, the initials and the icon fallback,
so what is announced does not depend on whether the picture loaded.
* fix(recording): preselect a storage service that is actually offered
The record & transcribe dialog computed its default storage service
without the constraints the storage selector applies: while a live
stream runs, or without the recording JWT feature, the file recordings
service and Dropbox are not offered. With the recording service enabled
the default stayed recording-service while the selector showed local
recording (the first option), so pressing Start started a Jibri file
recording instead of the local one the user saw.
Compute the offered services in one helper used by both the dialog and
its content, pick the default among them, and recompute it whenever the
selection stops being offered while no recording runs (e.g. a live
stream starts while the dialog is open).
Starting transcription on its own no longer depends on the storage
selection: it always goes through setRequestingSubtitles. Previously it
only did so when the recording service was selected, which is what kept
transcription working during a live stream; with local recording now
preselected there it would have only written the room metadata.
Follow-up to #17732.
* fix(recording): only request recording in metadata for a file recording
Starting transcription on its own passed isRecordingRequested=true
whenever any recording ran, including a local one. A local recording is
never announced through the room metadata, so remote participants saw
isRecordingRequested flip to true, waited for a file recording session
that never came, and never showed the transcription start notification.
Set it only when a file recording is started or already active.
* feat(recording): disable starting transcription while subtitles are transcribed
When a transcriber is in the meeting only for the subtitles, a recorder
transcription cannot be started on top of it: the dialog still offered
Start transcription, but nothing happened. Disable it, and the start
both button, in that case, with a tooltip on web saying transcription is
already on, and do not start transcription along with the recording when
auto transcribe on record is on.
* fix(recording): announce recording started from the suggestion notification
With autoTranscribeOnRecord, starting the recording from the suggestion
notification requested the subtitles without forcing the metadata
update, so the room metadata was only written with async transcription
on. Without it, and whenever a transcriber was already in the meeting,
remote participants got no recording start notification.
Force the metadata update like the dialog and the external API do, only
auto transcribe when no transcriber is in the meeting yet, and keep a
running transcription in the metadata when only recording is announced.
* test(recording): cover the dialog during a live stream and with a subtitles transcriber
- local recording is preselected while a live stream runs, including
when the live stream starts while the dialog is open;
- Start transcription and Start both are disabled, with a tooltip,
while a transcriber is in the meeting only for the subtitles;
- starting transcription during a local recording does not set
isRecordingRequested in the room metadata a remote participant sees.
* test(recording): wait for the tooltip text, not just the tooltip element
The tooltip fades in: it is in the DOM before it is visible, and
getText() returns an empty string for it until then.
* fix(recording): clear the transcription flag when inviting the transcriber fails
When starting transcription, the recording room metadata gets
isTranscribingEnabled before the transcriber is invited. If inviting it
failed the flag stayed set, so remote participants kept waiting for the
transcription and never got the notification about a recording started
along with it.
Clear the flag on failure, keeping the rest of the recording metadata.
On the receiving side, the flag cleared with no transcriber in the
meeting is a failed start rather than a stop: stop waiting for the
transcription, so the recording start is still notified, and do not
notify a transcription stop.
* test(recording): cover a failed transcriber invite when starting recording and transcription
The transcription flag is cleared while the recording stays requested,
and the remote participant stops waiting for the transcription and gets
the recording-only start notification once the file recording is on.
* test(recording): wait for Start both to be enabled
The dialog keeps it disabled while validating the Dropbox token, on
deployments with Dropbox enabled.
* fix(subtitles): clear the transcription flag without waiting for the metadata echo
When inviting the transcriber fails before the server has echoed back
the metadata update requesting it, the local copy of the metadata does
not have isTranscribingEnabled set yet, so the flag was not cleared.
Re-apply what the request wrote instead: isRecordingRequested when a
recording was requested along with it, and isTranscribingEnabled off.
* fix(recording): do not validate an empty Dropbox token
mapStateToProps maps a missing Dropbox token to '', so the dialog
validated it against the Dropbox API on every open, which fails, and
kept the start buttons disabled until the request came back.
* fix(recording): notify a transcription stop when the transcriber left first
The recording metadata listener treated the transcription flag cleared
with no transcriber in the meeting as a failed start. A normal stop can
also look like that, when TRANSCRIBER_LEFT arrives before the metadata
update, and its stop notification was then suppressed.
Only treat it as a failed start while a start is still waiting for the
transcription, or after inviting the transcriber failed on this client.
* fix(subtitles): clear the transcription flag from the latest metadata
After a failed transcriber invite, the error handler re-applied the
recording request it was made with, so a recording stopped while the
invite was pending was requested again.
Build the update from the latest metadata instead, only turning
isTranscribingEnabled off. When the metadata update requesting the
transcription has not been echoed back yet, wait for that echo first.
* test(recording): cover a cancelled recording and a stop after the transcriber left
- a failed transcriber invite does not restore a recording request
cancelled while the invite was pending;
- a transcription stop is notified when the transcriber left before the
transcription flag was cleared.
* fix(recording): stop waiting for a recording cancelled before it started
When the recording request was withdrawn before any file recording
session existed, e.g. stopped while the transcriber invite was pending,
remote participants kept a start intent waiting for that recording, and
a later start would not be announced correctly. They also notified a
stop for a recording that never started.
Treat it like a failed transcription start: drop the recording from the
pending start, and do not notify a recording stop.
* test(recording): check a cancelled recording leaves nothing pending
The remote participant stops waiting for the recording and notifies no
recording stop.
* test(recording): wait for the previous test's recording stopped notification to go away
The previous test's cleanup stops its fake recording, which the remote
participant notifies. That notification was still shown when the check
that a cancelled recording notifies no stop ran.
* test(recording): skip the transcriber invite failure tests with async transcription
With async transcription the client does not invite the transcriber
itself, so there is no invite that can fail.
* refactor(recording): decide auto transcription on record in one place
shouldAutoTranscribeOnRecord() now also answers no while a transcriber is in
the meeting, for the subtitles or for a running transcription, since it cannot
be started again. The suggestion notification and the dialog no longer repeat
that check with their own formulas.
* refactor(recording): decide the dialog state in a single model
getRecordingDialogModel() in dialogModel.ts now computes everything the
recording & transcription dialog decides, from the redux facts and the
dialog's own state: the services offered and the one selected, whether each
section and the footer are shown, what is running, whether each start button
is enabled and why not (a blocker, which the web content turns into a
tooltip when there is an explanation for the user).
The dialog builds the model and applies it in its handlers, the content
renders it. The content no longer derives any of those decisions from redux
on its own, so the dialog and its content cannot disagree, and the web and
native contents no longer repeat the start-both and start-transcription
rules.
* fix(recording): invite the transcriber when starting it with a local or Dropbox recording
Starting transcription along with a local or a Dropbox recording only wrote
isTranscribingEnabled to the room metadata: nothing requested the
transcriber, so remote participants waited for a transcription that never
came. Requesting the subtitles now invites it whatever recording starts with
it, and writes the metadata the same way for every storage service.
A local recording also no longer seeds the start intent: it is not a file
recording session, the coordinator could never resolve it, and the local
recording middleware notifies about it on its own.
* fix(recording): sign out of Dropbox only when the user picks another service
The content signed out whenever the selected service moved away from Dropbox,
including when the dialog re-picked it on its own because the services offered
changed (a live stream started, another moderator started a session). A signed
in user lost the stored token without touching anything. The sign-out now
happens in the service change handler, with the user's choice.
* fix(recording): do not block Start both on a running transcription's reason
With a recorder transcription running and end-to-end encryption turned on
meanwhile, Start both only starts the recording, yet it was disabled with the
E2EE reason. A transcription blocker now only counts while no transcription
runs, as the recording one already did.
* fix(subtitles): clear the transcription flag reliably after a failed invite
Waiting for the echo of the metadata update compared the local copy by
identity, so any other metadata update arriving first ended the wait on a copy
without the flag, and the echo then left it set. The wait now ends when the
flag shows up in the local copy, whatever arrives before it, and when nothing
sets it in time the flag is cleared anyway instead of staying set for the
remote participants.
* fix(recording): do not take a stop for a cancelled start after the session was on
A recording request withdrawn with a start intent still pending and no active
file session counted as a start cancelled before it began, which silenced the
stop notification. A start intent can stay pending after the session was on,
e.g. while waiting for an initiator jicofo never delivers, and the session's
off update can arrive before the metadata update: a real stop then went
unnoticed. The intent now records that its session was seen on, and only a
start without that counts as cancelled.
* docs(recording): describe the service kept while a recording runs accurately
The selection kept while a recording runs is the service whose options are
shown, not necessarily the one recording: the dialog opens on the default
service whatever runs, as it did before.
* refactor(recording): take the auto transcription decision from the selector alone
The model repeated the conditions shouldAutoTranscribeOnRecord() already
folds in, so a change to the selector would have silently diverged from the
dialog.
* refactor(recording): validate the Dropbox token unconditionally on mount
mapStateToProps maps a missing token to '', and _onTokenUpdated() handles
that itself, so the undefined check on mount was dead and read as if an
undefined token were a real state.
* test(recording): join once per live stream describe and scope the tooltip lookup
Every test of the live stream describe rejoined the conference its setup had
already joined; the fake live stream is now ended after each test instead,
with no side effect. The tooltip lookup matched any popover on the page; it
now looks for the one repeating the button's description.
* docs(recording): describe the live stream spec's config and support flag
The inner functions of the subtitles middleware got theirs along with the
rewrite of the metadata echo wait.
* fix(subtitles): clear the transcription flag from what the participant asked for
After a failed transcriber invite the flag was cleared from the local copy of
the room metadata, which only reflects a write once the server echoed it back.
Depending on the timing of that echo the clear either waited for the flag to
show up, and then cleared the next transcription started within ten seconds,
or restored a recording request the participant had withdrawn meanwhile.
The clear now happens at once, with isRecordingRequested taken from the redux
state: a file recording on or requested and not stopped since. The server
applies the updates in order, so it lands after the request whether or not
the echo arrived.
* fix(recording): keep recordingStarted when a failed transcription rewrites the intent
Rewriting the start intent after a failed transcriber invite dropped the
recordingStarted flag, so a recording whose session was already on looked
like one that never started: a later stop whose off update arrived before the
metadata echo was then taken for a cancelled start and went unnoticed.
* refactor(recording): move the dialog model into functions.ts
The dialog model, its facts and blockers now live with the other recording
selectors instead of in a file of their own next to the dialog components.
* fix(visitors): deduplicate promotion requests by visitor JID
* fix(visitors): keep a visitor's place when its promotion request is updated
---------
Co-authored-by: damencho <[email protected]>
* test(iframe): add specs for pinParticipant command
Signed-off-by: Ravindra <[email protected]>
* test(iframe): tidy the pinParticipant steps in the tile view spec
Share a pin indicator helper, wait for the non-existing id command to be handled before checking, and check the local participant on large video after pinning it.
---------
Signed-off-by: Ravindra <[email protected]>
Co-authored-by: damencho <[email protected]>
* fix(i18n): map region language codes to their day.js locales
* fix(i18n): match day.js locales case-insensitively
* fix(transcribing): map region language codes to their BCP-47 tags
The popup with the extra join buttons renders as a modal dialog that
receives focus when it opens, but nothing labelled it, so screen readers
announced an anonymous "dialog". Reuse the arrow's "Join options" label
so users hear where they landed.
The arrow next to "Join meeting" was labelled "Join without audio", the
caption of one item inside the popup it opens. Screen reader users heard
an action that pressing the arrow does not perform, and with
hideExtraJoinButtons set to hide that item the label named an option that
was not even shown. Call it "Join options", which is what it opens.
The arrow next to "Join meeting" opens a popup with the extra join
buttons, but it exposed aria-pressed, so screen readers announced it as
a toggle button and never said whether the popup was open. Expose
aria-expanded following the popup state instead, with aria-haspopup set
to "dialog", which is what the Popover renders (WCAG 4.1.2 Name, Role,
Value; reported by a JaaS customer's accessibility audit).
enterDisplayName clears the input and then sends keys to the driver. The
WebDriver "clear" command unfocuses the element afterwards; chromedriver
skips that step but geckodriver follows it, so in Firefox the typed name
landed in the page body and the pre-join assertions that depend on the
name being set failed. Re-focusing the input after clearing makes the
helper behave the same in both browsers.
The "display name required" spec already drives the pre-join screen into
the disabled state. Asserting the tabindex of the join button and its
options arrow there, and again after a name is entered, makes CI catch a
regression of the focus-order fix instead of relying on manual checks.
While the "Join meeting" button is disabled (empty name, joining in
progress, or no unsafe-room consent yet) it kept tabindex="0", so
keyboard users stopped on a control that did nothing. A WCAG 2.2 AA
audit of a JaaS embed rated this High (2.4.3 Focus Order). Give the
button and its options arrow tabindex="-1" while disabled.
* test(iframe): add specs for the A/V moderation commands and events
* test(iframe): cover moderation reset on disable and no-op reject before approval
* fix(google-api): wait for the Google Identity script and reject when loading fails
* fix(google-api): track each library load and surface failures to callers
* fix(google-api): retry explicitly and only flag real load failures
The sentence was finished by the line that moved the desktop Close
button, which the previous commit removed. Make it a complete sentence
about the mobile heading so the remaining comment stands on its own.
In the Settings dialog on desktop the Close (X) button is shown at the
top-right but rendered right after the tab panels, so keyboard users
reach it between the tab content and Cancel/OK. An external WCAG 2.2 AA
audit of a JaaS embed flagged this as a focus-order issue (2.4.3): the
button is expected after the footer buttons, not in the middle.
Render the button after the footer instead. CSS still places it at the
top-right, and Tab from a selected tab still leads straight into its
panel, which is what the original placement was meant to preserve.
The afterEach hook ran even when checkIframeApi() skipped the suite. With
initialFlipX never set it always tried to restore the mirror setting through
the disabled iframe API and failed after 5s. Drop the hook like the other
iframe specs do; the toggle test already restores the initial state itself.
The sidebar of DialogWithTabs had tabindex="0" (added in #15869 so a
screen reader would read the dialog title before the tabs), which made
the whole tab list an extra focus stop before the selected tab (WCAG
2.4.3 Focus Order; reported by a JaaS customer's accessibility audit).
Only the selected tab needs to be in the tab order: the tabs already
move focus between themselves with the arrow keys, and screen readers
announce the tab list's label when focus lands on a tab, so the title
is still read out.
* feat(polls): let the creator or a moderator close a poll
The End poll button is behind showEndPollButton in config.js, off by default,
since it needs the updated mod_polls_component. Visitor nodes learn about a
close from the main prosody and converge on its results.
* fix(polls): confirm ending a poll, test the visitor node paths
- Ending a poll asks for confirmation first, from one useClosePoll hook used
by the voting form and the results on web and native.
- A refused close or vote shows a notification (lib-jitsi-meet rejects
closePoll/answerPoll on the polls component's error reply).
- closePoll guards a missing getPolls().
- The native End poll button sits in the Skip/Submit row.
- The main prosody's close broadcast leaves out the answers, the occupants
have them; only a visitor node sends the main prosody's answers, and the
reducer keeps the local names of their voters.
- A visitor node replies not-allowed to a close, and handles every poll an
update closed before going on to a new poll or vote in the same update.
- The prosody tests run a polls component as a visitor node, and check that
a close fires poll-closed for mod_visitors.
- createPollEvent documents poll.closed.
* fix(polls): close the native end poll dialog and tell refused votes apart
The native dialog stayed open after confirming, because AbstractDialog takes
an undefined onSubmit result as a failed submit.
A refused vote said the poll had ended for any error. Only not-allowed means
that, other errors get a generic message. A late vote or a refused close also
doesn't need a sticky error, so both use the long timeout.
The knocking participant notification slides in over 200ms. Clicking its
Admit or Reject button while it is still moving can miss the button, so
the moderator action is never sent and the test waiting for the outcome
times out. Wait for the notification to be stable first, as the lobby
notifications are already closed.
* perf(prosody): cache the results of xml_escape and jid.split
A large room sends the same presence to every occupant, so prosody escapes
and splits the same strings again and again. A new global module,
mod_hot_path_cache, caches both functions of util.stanza and util.jid.
* feat(prosody): keep mod_hot_path_cache off unless hot_path_cache_enabled is set
* fix(prosody): do not keep oversized JIDs in mod_hot_path_cache
JIDs longer than the RFC 7622 maximum of 3071 bytes are split without being
cached, the cache size falls back to 10000 when the option is not a number,
and the header says unloading does not drop the cache from modules that took
a reference to it.
When the ban's session:close() lands between SASL success and resource
binding, the stream restart can also be written while the WebSocket is still
closing. ws then fails the send with a plain Error ("WebSocket is not open:
readyState 2 (CLOSING)") rather than a TypeError, so assertBanned failed the
test on a ban that had worked.
Accept that error for the 'restart' path as well, still only when the server
has closed the stream. Prosody sends the framing <close/> before it closes the
WebSocket, so the stream close is always seen first.
The output filter looked up the <conference> child with get_child() and no
namespace, so it only matched a child without one. The conference IQs from
lib-jitsi-meet and from Smack (Jicofo, Jigasi) carry the
http://jitsi.org/protocol/focus namespace and were never rewritten; Jicofo
receives and handles the room JID in its virtual form. Remove the block, which
also drops a child lookup from every IQ the filter sees.
An IQ sent to a host-only virtual MUC address (e.g. disco#info to
conference.foo.example.com) has its reply mapped back to that address. The
entry was keyed by the stanza id alone and was looked up for every stanza,
so any stanza with the same id took it.
Key the entry by the requester's full JID and the IQ id, remember only iq
get/set addressed to the bare host, and apply it only to a result or error
from the real MUC host addressed to the requester. Entries are kept in a
bounded cache. The lookup now starts with a single string comparison, so
stanzas that are not from the MUC host no longer pay for a table lookup.
The <conference> room rewrite no longer passes the stanza, so it does not
store entries.
* feat(prosody): take the room from the stanza in limit messages and display name filter
mod_muc_limit_messages counts a message against the room it is addressed
to, and only when the sender is an occupant of that room. The handler runs
before mod_muc checks the sender, so messages from non-occupants are not
counted and do not change the check_token state of the room.
The hideDisplayNameForGuests filter in mod_muc_displayname finds the room
from the presence sender, mapping the tenant address to the internal one.
Neither depends on the ?room= value of the connection anymore.
* fix(prosody): store ?room= in the encoded form of the room JID
Since 6f8414e67 the client sends the decoded room name in ?room=, while the
room JID node is still the percent-encoded name. Modules that look the room
up from session.jitsi_web_query_room found nothing for names that need
encoding (spaces, non-ASCII, ...).
mod_jitsi_session now percent-encodes the value like the client encodes the
room JID (encodeURIComponent, lowercase hex). Existing escapes are kept, so
older clients that send the encoded name keep working.
* feat(prosody): count breakout room messages against the main room
When mod_muc_limit_messages is loaded on the breakout component, a message
in a breakout room counts against its main room, and a cap lifted in the
main room is lifted in its breakout rooms. The main room is the one the
session joined (jitsi_breakout_main_jid, set by mod_muc_breakout_rooms) and
is used only when it lists the breakout room.
Messages from the transcriber (transcription results) are not counted.
Tests cover breakout rooms, transcriber messages, private messages past
the cap and more ?room= encoding cases.
* fix(conference): keep the local mic until its replacement is in use
On a device list change, _onDeviceListChanged stopped the local audio stream before creating the new track.
If the replacement then failed, e.g. the transceiver lookup missed a mic with an active stream effect, nothing
was left sending audio.
Leave the old audio track running. replaceLocalTrack disposes it once the new track has replaced it. For a
changed default mic, gUM is already called with the real device id. If the replacement fails, dispose of the
new track instead.
* fix(conference): only dispose a device change track that wasn't adopted
The catch added for a failed audio replacement disposed the new track on any rejection. Some steps run after
the conference has already switched to it, e.g. applying the screen share audio mixer, and a failure there
disposed the only mic left sending. Dispose only a track that isn't in the conference or the store.
Apply the same cleanup to a failed video replacement, so the new camera isn't left open, notify the user
like a manual device switch does, and update the audio and video icons even when a replacement fails.
The native Button defaulted accessibilityLabel to t(accessibilityLabel ?? ''), so callers that omitted the prop got an empty label. Fall back to labelKey (and undefined when neither is set) so every button is announced by screen readers without per-call props.
The auto-allow check in the main room pre-join hook applied the live
condition only to the per-room autoPromote flag, so with
auto_allow_visitor_promotion enabled occupants were let in while the
room was not live. Group both auto-promote sources before the live check.
Raised hands are auto-accepted only when the room is live, otherwise the
request goes to the moderators.
Adds busted unit tests for the pre-join hook and the promotion requests.
* test(prosody): accept a mod_muc_auth_ban close that lands mid-restart
mod_muc_auth_ban's ban check is an async HTTP call, so where its
session:close() lands depends on timing. assertBanned handled a refusal
during SASL and a close of an online session, but the close can also
land after SASL success and before resource binding. start() then
rejects with a TypeError, either from the stream restart writing to the
already reset socket or from the WebSocket reporting the close, and the
test failed on a ban that had worked.
createXmppClient now marks a start() rejection that follows the server
closing the stream, and assertBanned accepts a TypeError only when that
mark is set, so an unrelated connection failure still fails the test.
The online case never worked either: waitForDisconnect waited for
'offline', which only a local stop() emits, so a server close timed it
out. It now also resolves on 'close' and 'disconnect'.
The mock access manager can hold its reply (delay), and createXmppClient
can hold the stream restart (restartDelay). Two new tests use them to pin
the ban to each of those points.
* test(prosody): check the path each pinned auth ban test takes
assertBanned accepts every way the ban can surface, so the two tests that
pin its timing passed whichever path the ban actually took. It now returns
the path it saw ('sasl', 'restart' or 'online'), and each pinned test
asserts its own, so a timing that drifts fails instead of passing quietly.
Also note on waitForDisconnect that the stream restart after SASL fires
neither 'close' nor 'disconnect', so a live session never resolves it.
* fix(shared-video): handle only commands for the shared video participant
The shared-video command adds the shared video participant on start and
removes the participant named by its value on stop. The value is the
video, but nothing checked that it names the shared video participant,
so a command with the id of a participant replaced that participant with
the shared video participant on start, or removed it on stop. This also
applied to the local participant and to participants who join later,
which receive the command with the stored presence.
Ignore shared-video commands whose value is the id of a participant other
than the shared video participant, and remove a participant on stop only
when it is the shared video participant.
Add a test for sharing and stopping a video and for commands with the id
of a participant.
* fix(prosody): remove shared-video commands for an occupant
The value of a shared-video command is the URL or the YouTube id of the
video, and the client adds or removes the participant whose id is that
value. Remove a shared-video element whose value is the nick of an
occupant of the room, the sender included, from the presence, whether or
not the room restricts video sharing. The MUC stores the presence
afterwards, so participants who join later do not receive it either.
Other shared-video elements in the presence pass.
* fix(shared-video): remove only the shared video participant when its owner leaves
When the owner of the shared video leaves, the participant with the id of
the video is removed. A participant who joins later can receive the stored
presence of the owner before the presence of the participant whose id is
that value. Then the shared video participant is created with that id and
is replaced when the participant joins, and the participant was removed
when the owner left.
Remove the participant only when it is the shared video participant.
* perf(prosody): use native base64 and reuse parsed keys in luajwtjitsi
When many clients connect at once, token verification was a visible part of
prosody's CPU. Decoding went through basexx, which is pure Lua, and every
verification parsed the public key PEM again, which takes milliseconds with
OpenSSL 3.
Decode and encode base64url with prosody's util.encodings, which is native
code, and keep the parsed keys. Decoding stays strict about the alphabet
and the length, and accepts padding. The base64url helpers are exported for
the plugins that read token segments themselves.
The specs get a pure Lua stand-in for util.encodings, as it is not there
outside prosody.
* chore(prosody): drop the basexx dependency
The token libraries now use prosody's util.encodings and the base64url
helpers of luajwtjitsi, so nothing needs basexx any more. Drop it from the
jitsi-meet-prosody dependencies, the plugin tests workflow and the
integration test image.
* fix(prosody): return an error for undecodable token segments
from_url64 returns nil and a message for input it cannot decode. Both values
went to cjson.safe.decode, which throws when it gets a second argument, so
parse_token threw instead of returning "Invalid header" or "Invalid body".
Only the decoded string is passed now.