fix(backend): ローカルタイムラインに投稿者自身の投稿への返信が含まれない問題を修正
This commit is contained in:
		
							parent
							
								
									8091e8b900
								
							
						
					
					
						commit
						5dc0463323
					
				|  | @ -26,6 +26,7 @@ | |||
| 
 | ||||
| ### Server | ||||
| - Fix: リストTLに自分のフォロワー限定投稿が含まれない問題を修正 | ||||
| - Fix: ローカルタイムラインに投稿者自身の投稿への返信が含まれない問題を修正 | ||||
| 
 | ||||
| ## 2023.10.2 | ||||
| 
 | ||||
|  |  | |||
|  | @ -120,7 +120,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint- | |||
| 					if (me && (note.userId === me.id)) { | ||||
| 						return true; | ||||
| 					} | ||||
| 					if (!ps.withReplies && note.replyId && (me == null || note.replyUserId !== me.id)) return false; | ||||
| 					if (!ps.withReplies && note.replyId && note.replyUserId !== note.userId && (me == null || note.replyUserId !== me.id)) return false; | ||||
| 					if (me && isUserRelated(note, userIdsWhoBlockingMe)) return false; | ||||
| 					if (me && isUserRelated(note, userIdsWhoMeMuting)) return false; | ||||
| 					if (note.renoteId) { | ||||
|  |  | |||
|  | @ -526,6 +526,20 @@ describe('Timelines', () => { | |||
| 			assert.strictEqual(res.body.some((note: any) => note.id === carolNote.id), true); | ||||
| 		}); | ||||
| 
 | ||||
| 		test.concurrent('他人のその人自身への返信が含まれる', async () => { | ||||
| 			const [alice, bob] = await Promise.all([signup(), signup()]); | ||||
| 
 | ||||
| 			const bobNote1 = await post(bob, { text: 'hi' }); | ||||
| 			const bobNote2 = await post(bob, { text: 'hi', replyId: bobNote1.id }); | ||||
| 
 | ||||
| 			await waitForPushToTl(); | ||||
| 
 | ||||
| 			const res = await api('/notes/local-timeline', { limit: 100 }, alice); | ||||
| 
 | ||||
| 			assert.strictEqual(res.body.some((note: any) => note.id === bobNote1.id), true); | ||||
| 			assert.strictEqual(res.body.some((note: any) => note.id === bobNote2.id), true); | ||||
| 		}); | ||||
| 
 | ||||
| 		test.concurrent('チャンネル投稿が含まれない', async () => { | ||||
| 			const [alice, bob] = await Promise.all([signup(), signup()]); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue