diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-09 16:47:46 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-09 16:47:46 +0900 |
| commit | 0f367da84b65c4ca2b3bb5af152df261d6de1260 (patch) | |
| tree | 25d1008b10ec531175b25efafb675b7db6eaffd4 /packages/backend/src/core/NoteCreateService.ts | |
| parent | lint fixes (diff) | |
| download | sharkey-0f367da84b65c4ca2b3bb5af152df261d6de1260.tar.gz sharkey-0f367da84b65c4ca2b3bb5af152df261d6de1260.tar.bz2 sharkey-0f367da84b65c4ca2b3bb5af152df261d6de1260.zip | |
fix(backend): TLを途中までしかページネーションできなくなることがある問題を修正
Fix #11404
Diffstat (limited to 'packages/backend/src/core/NoteCreateService.ts')
| -rw-r--r-- | packages/backend/src/core/NoteCreateService.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 277875a19f..65beb9f970 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -822,6 +822,10 @@ export class NoteCreateService implements OnApplicationShutdown { @bindThis private async pushToTl(note: MiNote, user: { id: MiUser['id']; host: MiUser['host']; }) { + // リモートから遅れて届いた(もしくは後から追加された)投稿日時が古い投稿が追加されるとページネーション時に問題を引き起こすため、3分以内に投稿されたもののみを追加する + // TODO: https://github.com/misskey-dev/misskey/issues/11404#issuecomment-1752480890 をやる + if (note.userHost != null && (Date.now() - note.createdAt.getTime()) > 1000 * 60 * 3) return; + const meta = await this.metaService.fetch(); const redisPipeline = this.redisForTimelines.pipeline(); |