Correct deletion of actions for non-legacy files

This commit is contained in:
PikaMug 2020-05-29 18:17:26 -04:00
parent cb87effb69
commit a5251dd8ce

View File

@ -277,9 +277,14 @@ public class ActionFactory implements ConversationAbandonedListener {
.replace("<file>", actionsFile.getName())); .replace("<file>", actionsFile.getName()));
return; return;
} }
String event = (String) context.getSessionData(CK.ED_EVENT_DELETE); String action = (String) context.getSessionData(CK.ED_EVENT_DELETE);
ConfigurationSection sec = data.getConfigurationSection("events"); String key = "actions";
sec.set(event, null); ConfigurationSection sec = data.getConfigurationSection(key);
if (sec == null) {
key = "events";
sec = data.getConfigurationSection(key);
}
sec.set(action, null);
try { try {
data.save(actionsFile); data.save(actionsFile);
} catch (IOException e) { } catch (IOException e) {