Say outright whether the profile is ours to change

Whether to offer the profile settings was inferred from whether the host
could close Element Call. For a component with no host bridge — the
default — nothing could, so an embedded Element Call let the user edit
the profile of an account that belongs to the host application.

`HostBridge.supportsProfileChanges` states it directly: true standalone,
where Element Call signed the user in itself; false for a widget's host
and for anything embedding the component (which sets it itself, since
the client it hands over is its own). The profile tab and the profile
shortcut follow that. What a host's ability to close us still decides —
what to show after the call ends — is a question about who owns our
lifetime, and stays keyed on `close`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Timo K.
2026-09-08 15:38:59 +02:00
co-authored by Claude Fable 5.1
parent f0359259f9
commit 7cd21476f7
7 changed files with 53 additions and 17 deletions
+2 -4
View File
@@ -116,10 +116,8 @@ export const GroupCallView: FC<Props> = ({
const hostBridge = useHostBridge();
// A host that can close us is a host that decides when we stop existing, so
// we neither show our own post-call screens nor assume we have time to
// finish what we are doing.
// TODO: this reads a capability as a proxy for who owns our lifetime. Worth
// finding a more direct way to express it — see the guidance in UrlParams.ts
// on naming behaviours rather than situations.
// finish what we are doing. (Whose account the user's is, by contrast, is
// stated outright: see `HostBridge.supportsProfileChanges`.)
const hostControlsLifetime = hostBridge.close !== undefined;
const muteAllAudio = useBehavior(muteAllAudio$);
+2 -5
View File
@@ -329,11 +329,8 @@ export const InCallView: FC<InCallViewProps> = ({
const openProfile = useMemo(
() =>
// A host that can dismiss us is a host that owns the user's account, so
// their profile is not ours to edit.
// TODO: another use of the close capability as a proxy — see the note in
// GroupCallView.
hostBridge.close === undefined
// The profile is only ours to edit when the account is ours
hostBridge.supportsProfileChanges
? (): void => {
setSettingsTab("profile");
setSettingsOpen(true);