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

Commit

Permalink
Use fire-forget pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
MadLittleMods committed Jul 19, 2022
1 parent b44f6a1 commit ac998bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/structures/LoggedInView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ class LoggedInView extends React.Component<IProps, IState> {

const pinnedEventIds = pinStateEvent.getContent().pinned.slice(0, MAX_PINNED_NOTICES_PER_ROOM);
for (const eventId of pinnedEventIds) {
const timeline = await this._matrixClient.getEventTimeline(room.getUnfilteredTimelineSet(), eventId);
const event = timeline.getEvents().find(ev => ev.getId() === eventId);
await this._matrixClient.getEventTimeline(room.getUnfilteredTimelineSet(), eventId);
const event = room.findEventById(eventId);
if (event) events.push(event);
}
}
Expand Down

0 comments on commit ac998bd

Please sign in to comment.