You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-07-31 15:24:23 +03:00
s/room_ephemeral/typing/
This commit is contained in:
@ -809,14 +809,14 @@ describe("SlidingSyncSdk", () => {
|
||||
});
|
||||
});
|
||||
});
|
||||
describe("ExtensionRoomEphemeral", () => {
|
||||
describe("ExtensionTyping", () => {
|
||||
let ext: Extension;
|
||||
beforeAll(async () => {
|
||||
await setupClient();
|
||||
const hasSynced = sdk!.sync();
|
||||
await httpBackend!.flushAllExpected();
|
||||
await hasSynced;
|
||||
ext = findExtension("room_ephemeral");
|
||||
ext = findExtension("typing");
|
||||
});
|
||||
it("gets enabled on the initial request only", () => {
|
||||
expect(ext.onRequest(true)).toEqual({
|
||||
|
@ -233,11 +233,11 @@ class ExtensionAccountData implements Extension {
|
||||
}
|
||||
}
|
||||
|
||||
class ExtensionRoomEphemeral implements Extension {
|
||||
class ExtensionTyping implements Extension {
|
||||
public constructor(private readonly client: MatrixClient) {}
|
||||
|
||||
public name(): string {
|
||||
return "room_ephemeral";
|
||||
return "typing";
|
||||
}
|
||||
|
||||
public when(): ExtensionState {
|
||||
@ -262,7 +262,7 @@ class ExtensionRoomEphemeral implements Extension {
|
||||
const ephemeralEvents = mapEvents(this.client, roomId, data.rooms[roomId]);
|
||||
const room = this.client.getRoom(roomId);
|
||||
if (!room) {
|
||||
logger.warn("got ephemeral events for room but room doesn't exist on client:", roomId);
|
||||
logger.warn("got typing events for room but room doesn't exist on client:", roomId);
|
||||
continue;
|
||||
}
|
||||
room.addEphemeralEvents(ephemeralEvents);
|
||||
@ -313,7 +313,7 @@ export class SlidingSyncSdk {
|
||||
const extensions: Extension[] = [
|
||||
new ExtensionToDevice(this.client),
|
||||
new ExtensionAccountData(this.client),
|
||||
new ExtensionRoomEphemeral(this.client),
|
||||
new ExtensionTyping(this.client),
|
||||
];
|
||||
if (this.opts.crypto) {
|
||||
extensions.push(
|
||||
|
Reference in New Issue
Block a user