remove aliases from cache

This commit is contained in:
2024-08-10 21:21:17 +02:00
parent 8b96ab2335
commit fd97f86116
@@ -349,9 +349,9 @@ public class SlashCommandListener extends ListenerAdapter {
return; return;
} }
Set<String> noteAliases = Main.getStorage().getAliases(note.id);
Storage.Status status = Main.getStorage().deleteNote(note.id); Storage.Status status = Main.getStorage().deleteNote(note.id);
if (status == Storage.Status.SUCCESS) { if (status == Storage.Status.SUCCESS) {
Set<String> noteAliases = Main.getStorage().getAliases(note.id);
noteAliases.forEach(aliases::remove); noteAliases.forEach(aliases::remove);
event.reply("Note deleted.") event.reply("Note deleted.")
.setEphemeral(true) .setEphemeral(true)