Conform more of the code base to strict null checking (#10147)

* Conform more of the code base to strict null checking

* More strict fixes

* More strict work

* Fix missing optional type

* Iterate
This commit is contained in:
Michael Telatynski 2023-02-13 17:01:43 +00:00 committed by GitHub
parent fa036a5080
commit da7aa4055e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
380 changed files with 682 additions and 694 deletions

View file

@ -96,8 +96,8 @@ export function getNestedReplyText(
// dev note: do not rely on `body` being safe for HTML usage below.
const evLink = permalinkCreator.forEvent(ev.getId());
const userLink = makeUserPermalink(ev.getSender());
const evLink = permalinkCreator.forEvent(ev.getId()!);
const userLink = makeUserPermalink(ev.getSender()!);
const mxid = ev.getSender();
if (M_BEACON_INFO.matches(ev.getType())) {
@ -191,8 +191,8 @@ export function makeReplyMixIn(ev?: MatrixEvent): IEventRelation {
// with those that do. They should set the m.in_reply_to part as usual, and then add on
// "rel_type": "m.thread" and "event_id": "$thread_root", copying $thread_root from the replied-to event.
const relation = ev.getRelation();
mixin.rel_type = relation.rel_type;
mixin.event_id = relation.event_id;
mixin.rel_type = relation?.rel_type;
mixin.event_id = relation?.event_id;
}
}