You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-25 05:23:13 +03:00
Properly rename ThreadEvents to ThreadEvent
This commit is contained in:
@@ -33,7 +33,7 @@ import {
|
|||||||
import { Crypto } from "../crypto";
|
import { Crypto } from "../crypto";
|
||||||
import { deepSortedObjectEntries } from "../utils";
|
import { deepSortedObjectEntries } from "../utils";
|
||||||
import { RoomMember } from "./room-member";
|
import { RoomMember } from "./room-member";
|
||||||
import { Thread, ThreadEvents } from "./thread";
|
import { Thread, ThreadEvent } from "./thread";
|
||||||
import { IActionsObject } from '../pushprocessor';
|
import { IActionsObject } from '../pushprocessor';
|
||||||
import { ReEmitter } from '../ReEmitter';
|
import { ReEmitter } from '../ReEmitter';
|
||||||
|
|
||||||
@@ -1321,7 +1321,7 @@ export class MatrixEvent extends EventEmitter {
|
|||||||
*/
|
*/
|
||||||
public setThread(thread: Thread): void {
|
public setThread(thread: Thread): void {
|
||||||
this.thread = thread;
|
this.thread = thread;
|
||||||
this.reEmitter.reEmit(thread, [ThreadEvents.Ready, ThreadEvents.Update]);
|
this.reEmitter.reEmit(thread, [ThreadEvent.Ready, ThreadEvent.Update]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ import { IRoomVersionsCapability, MatrixClient, PendingEventOrdering, RoomVersio
|
|||||||
import { JoinRule, ResizeMethod } from "../@types/partials";
|
import { JoinRule, ResizeMethod } from "../@types/partials";
|
||||||
import { Filter } from "../filter";
|
import { Filter } from "../filter";
|
||||||
import { RoomState } from "./room-state";
|
import { RoomState } from "./room-state";
|
||||||
import { Thread, ThreadEvents } from "./thread";
|
import { Thread, ThreadEvent } from "./thread";
|
||||||
|
|
||||||
// These constants are used as sane defaults when the homeserver doesn't support
|
// These constants are used as sane defaults when the homeserver doesn't support
|
||||||
// the m.room_versions capability. In practice, KNOWN_SAFE_ROOM_VERSION should be
|
// the m.room_versions capability. In practice, KNOWN_SAFE_ROOM_VERSION should be
|
||||||
@@ -1074,9 +1074,9 @@ export class Room extends EventEmitter {
|
|||||||
public addThread(thread: Thread): Set<Thread> {
|
public addThread(thread: Thread): Set<Thread> {
|
||||||
this.threads.add(thread);
|
this.threads.add(thread);
|
||||||
if (!thread.ready) {
|
if (!thread.ready) {
|
||||||
thread.once(ThreadEvents.Ready, this.dedupeThreads);
|
thread.once(ThreadEvent.Ready, this.dedupeThreads);
|
||||||
this.emit(ThreadEvents.Update, thread);
|
this.emit(ThreadEvent.Update, thread);
|
||||||
this.reEmitter.reEmit(thread, [ThreadEvents.Update, ThreadEvents.Ready]);
|
this.reEmitter.reEmit(thread, [ThreadEvent.Update, ThreadEvent.Ready]);
|
||||||
}
|
}
|
||||||
return this.threads;
|
return this.threads;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user