Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit c1315bf

Browse files
authored
Fix useUserStatusMessage exploding on unknown user (#7365)
1 parent 1d9906c commit c1315bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hooks/useUserStatusMessage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { useFeatureEnabled } from "./useSettings";
2525

2626
const getUser = (cli: MatrixClient, user: Member): User => cli.getUser(user?.userId);
2727
const getStatusMessage = (cli: MatrixClient, user: Member): string => {
28-
return getUser(cli, user).unstable_statusMessage;
28+
return getUser(cli, user)?.unstable_statusMessage;
2929
};
3030

3131
// Hook to simplify handling Matrix User status

0 commit comments

Comments
 (0)