upd: update notes live on feed

This commit is contained in:
Mar0xy 2023-09-22 23:44:07 +02:00
parent d869d7aa05
commit 5d40ca6568
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
3 changed files with 24 additions and 2 deletions

View file

@ -525,7 +525,9 @@ export class NoteEditService implements OnApplicationShutdown {
// Pack the note
const noteObj = await this.noteEntityService.pack(note);
this.globalEventService.publishNotesStream(noteObj);
this.globalEventService.publishNoteStream(note.id, 'updated', {
updatedAt: note.updatedAt!,
});
this.roleService.addNoteToRoleTimeline(noteObj);

View file

@ -142,6 +142,9 @@ export interface NoteStreamTypes {
reaction: string;
userId: MiUser['id'];
};
updated: {
updatedAt: Date;
}
}
type NoteStreamEventTypes = {
[key in keyof NoteStreamTypes]: {