From 96e04c0e7bdc6c58f04a0e9e16077475f30cec27 Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Fri, 30 Jan 2026 08:41:59 -0500 Subject: [PATCH] KeywordNotify: Update --- src/equicordplugins/keywordNotify/index.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/equicordplugins/keywordNotify/index.tsx b/src/equicordplugins/keywordNotify/index.tsx index 68878903d..10b08dddb 100644 --- a/src/equicordplugins/keywordNotify/index.tsx +++ b/src/equicordplugins/keywordNotify/index.tsx @@ -371,14 +371,14 @@ export default definePlugin({ return this.modify(e); }; - FluxDispatcher.subscribe("MESSAGE_CREATE", interceptor); - FluxDispatcher.subscribe("MESSAGE_UPDATE", interceptor); - FluxDispatcher.subscribe("LOAD_MESSAGES_SUCCESS", interceptor); + FluxDispatcher.addInterceptor(interceptor); }, + stop() { - FluxDispatcher.unsubscribe("MESSAGE_CREATE", interceptor); - FluxDispatcher.unsubscribe("MESSAGE_UPDATE", interceptor); - FluxDispatcher.unsubscribe("LOAD_MESSAGES_SUCCESS", interceptor); + const index = FluxDispatcher._interceptors.indexOf(interceptor); + if (index > -1) { + FluxDispatcher._interceptors.splice(index, 1); + } }, applyKeywordEntries(m: Message) { @@ -475,6 +475,7 @@ export default definePlugin({ try { messageRecord = createMessageRecord(m); } catch (err) { + console.error(err); return; }