diff options
| author | Hazel K <acomputerdog@gmail.com> | 2024-10-02 11:38:21 -0400 |
|---|---|---|
| committer | Hazel K <acomputerdog@gmail.com> | 2024-10-02 11:38:21 -0400 |
| commit | ef7cde6bc6a2159f0fd041d26a3cb77cb0d53be9 (patch) | |
| tree | 20a2927cb9bee70a0c7932c7b2ef16eb6cb858e2 /packages/backend/src/core/NoteCreateService.ts | |
| parent | Revert "respect CWs in note summaries" (diff) | |
| download | sharkey-ef7cde6bc6a2159f0fd041d26a3cb77cb0d53be9.tar.gz sharkey-ef7cde6bc6a2159f0fd041d26a3cb77cb0d53be9.tar.bz2 sharkey-ef7cde6bc6a2159f0fd041d26a3cb77cb0d53be9.zip | |
fixes from peer review
Diffstat (limited to 'packages/backend/src/core/NoteCreateService.ts')
| -rw-r--r-- | packages/backend/src/core/NoteCreateService.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 0af65b81b1..daf0894cfd 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -1134,7 +1134,8 @@ export class NoteCreateService implements OnApplicationShutdown { } private async updateLatestNote(note: MiNote) { - // Ignore DMs + // Ignore DMs. + // Followers-only posts are *included*, as this table is used to back the "following" feed. if (note.visibility === 'specified') return; // Ignore pure renotes @@ -1143,7 +1144,7 @@ export class NoteCreateService implements OnApplicationShutdown { // Make sure that this isn't an *older* post. // We can get older posts through replies, lookups, etc. const currentLatest = await this.latestNotesRepository.findOneBy({ userId: note.userId }); - if (currentLatest != null && currentLatest.userId >= note.id) return; + if (currentLatest != null && currentLatest.noteId >= note.id) return; // Record this as the latest note for the given user const latestNote = new LatestNote({ |