From 5d1d054b7ed78ec46479da30bbad71d31c1e14ca Mon Sep 17 00:00:00 2001 From: V Date: Sat, 24 Jun 2023 16:55:57 +0200 Subject: [PATCH] MessageLinkEmbeds: Use api --- src/plugins/messageLinkEmbeds.tsx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/messageLinkEmbeds.tsx b/src/plugins/messageLinkEmbeds.tsx index 5fae23458..68bd25390 100644 --- a/src/plugins/messageLinkEmbeds.tsx +++ b/src/plugins/messageLinkEmbeds.tsx @@ -16,6 +16,7 @@ * along with this program. If not, see . */ +import { updateMessageComponent } from "@api/ComponentUpdater"; import { addAccessory } from "@api/MessageAccessories"; import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; @@ -28,7 +29,6 @@ import { find, findByCode, findByPropsLazy } from "@webpack"; import { Button, ChannelStore, - FluxDispatcher, GuildStore, MessageStore, Parser, @@ -228,10 +228,7 @@ function MessageEmbedAccessory({ message }: { message: Message; }) { delete msg.interaction; messageFetchQueue.push(() => fetchMessage(channelID, messageID) - .then(m => m && FluxDispatcher.dispatch({ - type: "MESSAGE_UPDATE", - message: msg - })) + .then(m => m && updateMessageComponent(message.id)) ); continue; }