fix(backend): TLを途中までしかページネーションできなくなることがある問題を修正

Fix #11404
This commit is contained in:
syuilo 2023-10-09 16:47:46 +09:00
parent 19a507633e
commit 0f367da84b
3 changed files with 8 additions and 0 deletions

View file

@ -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();