mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-12-03 21:51:06 +00:00
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:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user