Show & clear your own on-a-call status (#34613)

* Show & clear your own on-a-call status

The user menu / settings now reflects your own on-a-call status
and pressing the 'clear' button will clear both m.status and m.call,
whichever are set.

* Update function name

* Fix tests

And make the clear status function simpler by just throwing if either fails.

* Fix more tests
This commit is contained in:
David Baker
2026-08-10 15:13:42 +01:00
committed by GitHub
parent 0b264a482e
commit fef1f0e0dd
8 changed files with 54 additions and 17 deletions
@@ -14,7 +14,7 @@ import {
type UserStatus,
} from "@element-hq/web-shared-components";
import { clearUserStatus, setUserStatus } from "../../utils/userStatus";
import { clearAllUserStatus, setUserStatus } from "../../utils/userStatus";
import { UPDATE_EVENT } from "../../stores/AsyncStore";
import dis from "../../dispatcher/dispatcher";
import { UserTab } from "../../components/views/dialogs/UserTab";
@@ -59,7 +59,7 @@ export class SetStatusViewModel
const oldStatus = this.snapshot.current.userStatus;
this.snapshot.merge({ userStatus: undefined });
clearUserStatus(this.props.client).catch((err) => {
clearAllUserStatus(this.props.client).catch((err) => {
this.snapshot.merge({ userStatus: oldStatus });
logger.warn("Failed to clear user status", err);
});