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

Commit

Permalink
[Release] Fix useUserStatusMessage exploding on unknown user
Browse files Browse the repository at this point in the history
#7365 to release
  • Loading branch information
t3chguy authored Dec 20, 2021
1 parent d10ac7c commit eaf7117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hooks/useUserStatusMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { useFeatureEnabled } from "./useSettings";

const getUser = (cli: MatrixClient, user: Member): User => cli.getUser(user?.userId);
const getStatusMessage = (cli: MatrixClient, user: Member): string => {
return getUser(cli, user).unstable_statusMessage;
return getUser(cli, user)?.unstable_statusMessage;
};

// Hook to simplify handling Matrix User status
Expand Down

0 comments on commit eaf7117

Please sign in to comment.