Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -34,9 +34,7 @@ interface EventMap {
* Optionally receive the current events by calling emitCurrent().
* Clean up everything by calling destroy().
*/
export class RelationsHelper
extends TypedEventEmitter<RelationsHelperEvent, EventMap>
implements IDestroyable {
export class RelationsHelper extends TypedEventEmitter<RelationsHelperEvent, EventMap> implements IDestroyable {
private relations?: Relations;
private eventId: string;
private roomId: string;
@ -89,11 +87,9 @@ export class RelationsHelper
private setRelations(): void {
const room = this.client.getRoom(this.event.getRoomId());
this.relations = room?.getUnfilteredTimelineSet()?.relations?.getChildEventsForEvent(
this.eventId,
this.relationType,
this.relationEventType,
);
this.relations = room
?.getUnfilteredTimelineSet()
?.relations?.getChildEventsForEvent(this.eventId, this.relationType, this.relationEventType);
}
private onRelationsAdd = (event: MatrixEvent): void => {
@ -101,7 +97,7 @@ export class RelationsHelper
};
public emitCurrent(): void {
this.relations?.getRelations()?.forEach(e => this.emit(RelationsHelperEvent.Add, e));
this.relations?.getRelations()?.forEach((e) => this.emit(RelationsHelperEvent.Add, e));
}
public getCurrent(): MatrixEvent[] {
@ -126,7 +122,7 @@ export class RelationsHelper
},
);
nextBatch = response?.nextBatch;
response?.events.forEach(e => this.emit(RelationsHelperEvent.Add, e));
response?.events.forEach((e) => this.emit(RelationsHelperEvent.Add, e));
} while (nextBatch);
}