summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-04 16:48:34 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-10-04 16:48:34 +0900
commitfb63fc12130347c90ead3b461cf78bdbcc357cbf (patch)
tree4db7fec513508c85a353debc5fba94046d1ec09c /packages
parenttweak timelines (diff)
downloadmisskey-fb63fc12130347c90ead3b461cf78bdbcc357cbf.tar.gz
misskey-fb63fc12130347c90ead3b461cf78bdbcc357cbf.tar.bz2
misskey-fb63fc12130347c90ead3b461cf78bdbcc357cbf.zip
tweak tl
Diffstat (limited to 'packages')
-rw-r--r--packages/backend/src/misc/is-user-related.ts4
-rw-r--r--packages/backend/test/e2e/timelines.ts8
2 files changed, 8 insertions, 4 deletions
diff --git a/packages/backend/src/misc/is-user-related.ts b/packages/backend/src/misc/is-user-related.ts
index ae8f4116cc..6efb1194d3 100644
--- a/packages/backend/src/misc/is-user-related.ts
+++ b/packages/backend/src/misc/is-user-related.ts
@@ -8,11 +8,11 @@ export function isUserRelated(note: any, userIds: Set<string>, ignoreAuthor = fa
return true;
}
- if (note.reply != null && userIds.has(note.reply.userId)) {
+ if (note.reply != null && note.reply.userId !== note.userId && userIds.has(note.reply.userId)) {
return true;
}
- if (note.renote != null && userIds.has(note.renote.userId)) {
+ if (note.renote != null && note.renote.userId !== note.userId && userIds.has(note.renote.userId)) {
return true;
}
diff --git a/packages/backend/test/e2e/timelines.ts b/packages/backend/test/e2e/timelines.ts
index d606c6729b..a82be6365a 100644
--- a/packages/backend/test/e2e/timelines.ts
+++ b/packages/backend/test/e2e/timelines.ts
@@ -856,13 +856,17 @@ describe('Timelines', () => {
await api('/mute/create', { userId: bob.id }, alice);
await sleep(1000);
- const bobNote = await post(bob, { text: 'hi' });
+ const bobNote1 = await post(bob, { text: 'hi' });
+ const bobNote2 = await post(bob, { text: 'hi', replyId: bobNote1.id });
+ const bobNote3 = await post(bob, { text: 'hi', renoteId: bobNote1.id });
await waitForPushToTl();
const res = await api('/users/notes', { userId: bob.id }, alice);
- assert.strictEqual(res.body.some((note: any) => note.id === bobNote.id), true);
+ assert.strictEqual(res.body.some((note: any) => note.id === bobNote1.id), true);
+ assert.strictEqual(res.body.some((note: any) => note.id === bobNote2.id), true);
+ assert.strictEqual(res.body.some((note: any) => note.id === bobNote3.id), true);
});
});