Apply strictNullChecks
to src/components/views/elements/*
(#10462
* Apply `strictNullChecks` to `src/components/views/elements/*` * Iterate * Iterate * Iterate * Apply `strictNullChecks` to `src/components/views/elements/*` * Iterate * Iterate * Iterate * Update snapshot
This commit is contained in:
parent
cefd94859c
commit
a47b3eb0ee
24 changed files with 158 additions and 121 deletions
|
@ -78,7 +78,9 @@ enum TransitionType {
|
|||
|
||||
const SEP = ",";
|
||||
|
||||
export default class EventListSummary extends React.Component<IProps> {
|
||||
export default class EventListSummary extends React.Component<
|
||||
IProps & Required<Pick<IProps, "summaryLength" | "threshold" | "avatarsMaxLength" | "layout">>
|
||||
> {
|
||||
public static contextType = RoomContext;
|
||||
public context!: React.ContextType<typeof RoomContext>;
|
||||
|
||||
|
@ -508,12 +510,12 @@ export default class EventListSummary extends React.Component<IProps> {
|
|||
const type = e.getType();
|
||||
|
||||
let userKey = e.getSender()!;
|
||||
if (type === EventType.RoomThirdPartyInvite) {
|
||||
if (e.isState() && type === EventType.RoomThirdPartyInvite) {
|
||||
userKey = e.getContent().display_name;
|
||||
} else if (type === EventType.RoomMember) {
|
||||
userKey = e.getStateKey();
|
||||
} else if (e.isRedacted()) {
|
||||
userKey = e.getUnsigned()?.redacted_because?.sender;
|
||||
} else if (e.isState() && type === EventType.RoomMember) {
|
||||
userKey = e.getStateKey()!;
|
||||
} else if (e.isRedacted() && e.getUnsigned()?.redacted_because) {
|
||||
userKey = e.getUnsigned().redacted_because!.sender;
|
||||
}
|
||||
|
||||
// Initialise a user's events
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue