diff --git a/src/equicordplugins/ghosted/GhostedUsersModal.tsx b/src/equicordplugins/ghosted/GhostedUsersModal.tsx index 7b78e562a..fec53d66d 100644 --- a/src/equicordplugins/ghosted/GhostedUsersModal.tsx +++ b/src/equicordplugins/ghosted/GhostedUsersModal.tsx @@ -29,7 +29,7 @@ function GroupDmsIcon({ channel }: { channel: Channel; }) { size="SIZE_40" aria-label={channel?.name || "Unnamed Group"} /> : ; @@ -51,7 +51,7 @@ export function getChannelDisplayName(channelId: string): string { } // 1-on-1 DM - const recipientId = channel.recipients?.[0]; + const recipientId = channel?.recipients?.[0] ?? ""; const user = UserStore.getUser(recipientId); return user?.username || "Unknown User"; } @@ -115,6 +115,7 @@ export function GhostedUsersModal({ modalProps, ghostedChannels: initialChannels const lastMessageDate = lastMessage?.timestamp ? formatMessageDate(lastMessage.timestamp) : ""; const displayName = getChannelDisplayName(channel.id); + const userId = channel?.recipients?.[0] ?? ""; return (
: } diff --git a/src/equicordplugins/ghosted/index.tsx b/src/equicordplugins/ghosted/index.tsx index 1730efd15..9c17bde8f 100644 --- a/src/equicordplugins/ghosted/index.tsx +++ b/src/equicordplugins/ghosted/index.tsx @@ -8,7 +8,7 @@ import "./styles.css"; import { findGroupChildrenByChildId } from "@api/ContextMenu"; import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList"; -import { definePluginSettings, migratePluginSettings } from "@api/Settings"; +import { definePluginSettings } from "@api/Settings"; import ErrorBoundary from "@components/ErrorBoundary"; import { Devs, EquicordDevs } from "@utils/constants"; import { classNameFactory } from "@utils/css"; @@ -132,7 +132,6 @@ function makeContextItem(props) { />; } -migratePluginSettings("Ghosted", "Boo"); export default definePlugin({ name: "Ghosted", description: "A cute ghost will appear if you don't answer their DMs",