From 18d47806358f0b5e4e82d58b4767743ff384970a Mon Sep 17 00:00:00 2001 From: Kyuuhachi <1547062+Kyuuhachi@users.noreply.github.com> Date: Wed, 3 Apr 2024 14:51:28 +0200 Subject: [PATCH] fix(MessageLinkEmbeds): Actually disable when disabled (#2323) --- src/plugins/messageLinkEmbeds/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/messageLinkEmbeds/index.tsx b/src/plugins/messageLinkEmbeds/index.tsx index 6ee60be7..2a5f8828 100644 --- a/src/plugins/messageLinkEmbeds/index.tsx +++ b/src/plugins/messageLinkEmbeds/index.tsx @@ -16,7 +16,7 @@ * along with this program. If not, see . */ -import { addAccessory } from "@api/MessageAccessories"; +import { addAccessory, removeAccessory } from "@api/MessageAccessories"; import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants.js"; @@ -389,4 +389,8 @@ export default definePlugin({ ); }, 4 /* just above rich embeds */); }, + + stop() { + removeAccessory("messageLinkEmbed"); + } });