mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-19 01:35:18 -04:00
feat: add realtime announcements for permission changes and note deletion
Co-authored-by: Erik Michelson <github@erik.michelson.eu> Signed-off-by: Erik Michelson <github@erik.michelson.eu> Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
c363d0834e
commit
331747f61b
6 changed files with 56 additions and 3 deletions
|
@ -260,6 +260,10 @@ export class NotesService {
|
|||
* @throws {NotInDBError} there is no note with this id or alias
|
||||
*/
|
||||
async deleteNote(note: Note): Promise<Note> {
|
||||
const realtimeNote = this.realtimeNoteStore.find(note.id);
|
||||
if (realtimeNote) {
|
||||
realtimeNote.announceNoteDeletion();
|
||||
}
|
||||
return await this.noteRepository.remove(note);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue