1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-04 05:02:41 +03:00

Fix PR comments

This commit is contained in:
Dariusz Niemczyk
2021-09-16 16:03:47 +02:00
parent ed68bd4108
commit 8ab0246ca2
3 changed files with 16 additions and 16 deletions

View File

@@ -20,9 +20,9 @@ import { MatrixEvent } from "./event";
import { EventTimelineSet } from './event-timeline-set';
import { Room } from './room';
export enum THREAD_EVENTS {
ready = "Thread.ready",
update = "Thread.update"
export enum ThreadEvents {
Ready = "Thread.ready",
Update = "Thread.update"
}
/**
@@ -78,7 +78,7 @@ export class Thread extends EventEmitter {
if (this.ready) {
this.client.decryptEventIfNeeded(event, {});
}
this.emit(THREAD_EVENTS.ready, this);
this.emit(ThreadEvents.Ready, this);
}
/**
@@ -101,7 +101,7 @@ export class Thread extends EventEmitter {
await this.fetchReplyChain();
} else {
await this.decryptEvents();
this.emit(THREAD_EVENTS.ready, this);
this.emit(ThreadEvents.Ready, this);
}
}
}
@@ -199,23 +199,23 @@ export class Thread extends EventEmitter {
return this.timelineSet.findEventById(eventId) instanceof MatrixEvent;
}
public on(event: THREAD_EVENTS, listener: (...args: any[]) => void): this {
public on(event: ThreadEvents, listener: (...args: any[]) => void): this {
super.on(event, listener);
return this;
}
public once(event: THREAD_EVENTS, listener: (...args: any[]) => void): this {
public once(event: ThreadEvents, listener: (...args: any[]) => void): this {
super.once(event, listener);
return this;
}
public off(event: THREAD_EVENTS, listener: (...args: any[]) => void): this {
public off(event: ThreadEvents, listener: (...args: any[]) => void): this {
super.off(event, listener);
return this;
}
public addListener(event: THREAD_EVENTS, listener: (...args: any[]) => void): this {
public addListener(event: ThreadEvents, listener: (...args: any[]) => void): this {
super.addListener(event, listener);
return this;
}
public removeListener(event: THREAD_EVENTS, listener: (...args: any[]) => void): this {
public removeListener(event: ThreadEvents, listener: (...args: any[]) => void): this {
super.removeListener(event, listener);
return this;
}