Skip to content

Commit

Permalink
feat: broadcast note deleted event - EXO-75617 - Meeds-io/MIPs#161 (#…
Browse files Browse the repository at this point in the history
…1239)

broadcast note deleted event
  • Loading branch information
hakermi committed Dec 9, 2024
1 parent 5f58b0d commit b770054
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ public class NoteServiceImpl implements NoteService {

public static final String FEATURED_IMAGE_ALT_TEXT = "featuredImageAltText";

public static final String NOTE_DELETED = "note.deleted";

private final WikiService wikiService;

private final DataStorage dataStorage;
Expand Down Expand Up @@ -440,7 +442,6 @@ public boolean deleteNote(String noteType, String noteOwner, String noteName) th

try {
dataStorage.deletePage(noteType, noteOwner, noteName);

} catch (WikiException e) {
log.error("Can't delete note '" + noteName + "' ", e);
return false;
Expand Down Expand Up @@ -490,7 +491,7 @@ public boolean deleteNote(String noteType, String noteOwner, String noteName, Id

deleteNote(noteType, noteOwner, noteName);
postDeletePage(noteType, noteOwner, noteName, note);

Utils.broadcast(listenerService, NOTE_DELETED, userIdentity, note);
// Post delete activity for all children pages
for (Page childNote : allChrildrenPages) {
postDeletePage(childNote.getWikiType(), childNote.getWikiOwner(), childNote.getName(), childNote);
Expand Down

0 comments on commit b770054

Please sign in to comment.