diff options
| author | dakkar <dakkar@thenautilus.net> | 2023-12-19 09:07:32 +0000 |
|---|---|---|
| committer | dakkar <dakkar@thenautilus.net> | 2023-12-23 14:09:51 +0000 |
| commit | 683b4aafb2928f2d8dfa626352584542e3df8e3a (patch) | |
| tree | 156e0a8fe4ea1646fee22b9857eaa62635f8c0c4 /packages/backend/src/core/NoteCreateService.ts | |
| parent | merge: upstream (diff) | |
| download | sharkey-683b4aafb2928f2d8dfa626352584542e3df8e3a.tar.gz sharkey-683b4aafb2928f2d8dfa626352584542e3df8e3a.tar.bz2 sharkey-683b4aafb2928f2d8dfa626352584542e3df8e3a.zip | |
real-time updates on note detail view
`useNoteCapture` already subscribes to all updates for a note, so
we can tell it when a note gets replied to, too
Since I'm not actually adding any extra subscription in the client,
just an extra callback, there should be no overhead when replies are
not coming in.
Also, all the timelines already call `useNoteCapture` for each note
displayed, so we know the whole `GlobalEventService` thing works fine.
Many thanks to VueJS for taking care of all the DOM complications
Diffstat (limited to 'packages/backend/src/core/NoteCreateService.ts')
| -rw-r--r-- | packages/backend/src/core/NoteCreateService.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 0b06931213..6406bc4c50 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -780,6 +780,9 @@ export class NoteCreateService implements OnApplicationShutdown { // If has in reply to note if (data.reply) { + this.globalEventService.publishNoteStream(data.reply.id, 'replied', { + id: note.id, + }); // 通知 if (data.reply.userHost === null) { const isThreadMuted = await this.noteThreadMutingsRepository.exist({ |