Start sending stable m.marked_unread events (#28478)

* Start sending stable `m.marked_unread` events

* Update tests
This commit is contained in:
Tulir Asokan
2024-11-18 11:25:36 +01:00
committed by GitHub
parent abf6d58b7b
commit 72a2773629
5 changed files with 7 additions and 10 deletions

View File

@@ -270,7 +270,7 @@ describe("notifications", () => {
// set true, no existing event
it("sets unread flag if event doesn't exist", async () => {
await setMarkedUnreadState(room, client, true);
expect(client.setRoomAccountData).toHaveBeenCalledWith(ROOM_ID, "com.famedly.marked_unread", {
expect(client.setRoomAccountData).toHaveBeenCalledWith(ROOM_ID, "m.marked_unread", {
unread: true,
});
});
@@ -287,7 +287,7 @@ describe("notifications", () => {
.fn()
.mockReturnValue({ getContent: jest.fn().mockReturnValue({ unread: false }) });
await setMarkedUnreadState(room, client, true);
expect(client.setRoomAccountData).toHaveBeenCalledWith(ROOM_ID, "com.famedly.marked_unread", {
expect(client.setRoomAccountData).toHaveBeenCalledWith(ROOM_ID, "m.marked_unread", {
unread: true,
});
});
@@ -316,7 +316,7 @@ describe("notifications", () => {
.fn()
.mockReturnValue({ getContent: jest.fn().mockReturnValue({ unread: true }) });
await setMarkedUnreadState(room, client, false);
expect(client.setRoomAccountData).toHaveBeenCalledWith(ROOM_ID, "com.famedly.marked_unread", {
expect(client.setRoomAccountData).toHaveBeenCalledWith(ROOM_ID, "m.marked_unread", {
unread: false,
});
});