Add togglable autoLeave to call config (#706)#707
Open
mvanhorn wants to merge 2 commits intoSableClient:devfrom
Open
Add togglable autoLeave to call config (#706)#707mvanhorn wants to merge 2 commits intoSableClient:devfrom
mvanhorn wants to merge 2 commits intoSableClient:devfrom
Conversation
Element Call supports an autoLeave URL parameter that controls whether
a call auto-terminates when all other participants leave. Sable was
never forwarding it, so the Element Call default (true for DM-style
calls) always applied with no way to override.
This adds an optional callOptions section to the client config with
an autoLeaveWhenOthersLeft boolean. When set, it flows from
useClientConfig -> useCallStart -> createCallEmbed -> CallEmbed.getWidget,
which translates it into the autoLeave URL parameter. When absent, the
current behavior is unchanged.
Example config.json:
"callOptions": {
"autoLeaveWhenOthersLeft": false
}
Contributor
|
Hi, thank you so much for contributing and i want to say that it is not a large change so its not as relevant but could you please follow the PR template |
Contributor
Author
|
Thanks @nushea - tightened the PR body to match the template more closely: shortened Description to the single-line summary the template asks for, kept |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an optional
callOptions.autoLeaveWhenOthersLeftfield to the Sable client config. When set,CallEmbedpasses the matchingautoLeavequery param to the Element Call widget URL; when absent, behavior is unchanged.Fixes #706
Type of change
Checklist:
AI disclosure:
Claude Code scaffolded the
CallOptionstype + theautoLeaveparameter plumbing acrossuseClientConfig.ts,CallEmbed.ts, anduseCallEmbed.ts; I checked the flow end-to-end: admin config field ->createCallEmbed->getWidget-> URL param, and confirmed the default path withcallOptionsabsent adds nothing to the URL.