KeywordNotify: Update

This commit is contained in:
thororen1234 2026-01-30 08:41:59 -05:00
parent f8e6b14024
commit 96e04c0e7b
No known key found for this signature in database

View file

@ -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;
}