From c2f77cee04de061f00747c6f5cadfdd6d88424de Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Tue, 25 Mar 2025 10:44:39 -0400 Subject: [PATCH] test: additional test for remote category topic assertion when ignoring category --- test/activitypub/notes.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/activitypub/notes.js b/test/activitypub/notes.js index 0bebb03927..3e2fbe7fcd 100644 --- a/test/activitypub/notes.js +++ b/test/activitypub/notes.js @@ -192,6 +192,23 @@ describe('Notes', () => { await topics.markAllRead(uid); }); + + it('should not show up in recent/unread if I am ignoring the remote category', async () => { + await api.categories.setWatchState({ uid }, { + cid: remoteCid, + state: categories.watchStates.ignoring, + uid, + }); + + const { id, note } = helpers.mocks.note({ + cc: [remoteCid], + }); + const assertion = await activitypub.notes.assert(0, id); + assert(assertion); + + const unread = await topics.getTotalUnread(uid); + assert.strictEqual(unread, 0); + }) }); });