Conform more of the codebase to strictNullChecks
(#10358
* Conform more of the codebase to `strictNullChecks` * Fix types * Iterate * Iterate
This commit is contained in:
parent
41d88ad6ae
commit
503df62191
76 changed files with 323 additions and 327 deletions
|
@ -24,11 +24,11 @@ import { _t } from "../../../languageHandler";
|
|||
const HistoryTile: React.FC = () => {
|
||||
const { room } = useContext(RoomContext);
|
||||
|
||||
const oldState = room.getLiveTimeline().getState(EventTimeline.BACKWARDS);
|
||||
const encryptionState = oldState.getStateEvents("m.room.encryption")[0];
|
||||
const historyState = oldState.getStateEvents("m.room.history_visibility")[0]?.getContent().history_visibility;
|
||||
const oldState = room?.getLiveTimeline().getState(EventTimeline.BACKWARDS);
|
||||
const encryptionState = oldState?.getStateEvents("m.room.encryption")[0];
|
||||
const historyState = oldState?.getStateEvents("m.room.history_visibility")[0]?.getContent().history_visibility;
|
||||
|
||||
let subtitle;
|
||||
let subtitle: string | undefined;
|
||||
if (historyState == "invited") {
|
||||
subtitle = _t("You don't have permission to view messages from before you were invited.");
|
||||
} else if (historyState == "joined") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue