[Release] Fix useUserStatusMessage exploding on unknown user (#7419)

https://github.com/matrix-org/matrix-react-sdk/pull/7365 to release
pull/21833/head
Michael Telatynski 2021-12-20 13:51:48 +00:00 committed by GitHub
parent d10ac7cfdb
commit 8923da7bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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