diff --git a/index.tsx b/index.tsx index 1a27ad6..c7b4885 100644 --- a/index.tsx +++ b/index.tsx @@ -8,13 +8,13 @@ import "./style.css"; import { Devs } from "@utils/constants"; import definePlugin from "@utils/types"; -import { ChannelStore, DateUtils, GuildStore, IconUtils, NavigationRouter, Popout, SnowflakeUtils, Text, UserStore, useStateFromStores } from "@webpack/common"; +import { ChannelStore, DateUtils, GuildStore, IconUtils, NavigationRouter, Popout, SelectedGuildStore, SnowflakeUtils, Text, UserStore, useStateFromStores } from "@webpack/common"; import { ArrowSvg, checkForIconExistence, cl, ServerProfileComponent } from "./utils"; export default definePlugin({ - name: "MoreForwardMeta", - description: "Show server profile under forwarded messages (if available) and always show time", + name: "BetterForwardMeta", + description: "Access server profile under forwarded messages (if available) and always show time", authors: [Devs.nin0dev], ForwardFooter(message: any) { const { guild_id, channel_id, message_id } = message.message.messageReference; @@ -23,26 +23,30 @@ export default definePlugin({ return
{ - guild_id && } - > - {popoutProps =>
- { - checkForIconExistence(guild) && {`Server - } - {guild ? guild.name : "View server"} - -
+ guild_id && <> + { + guild_id !== SelectedGuildStore.getGuildId() && } + > + {popoutProps =>
+ { + checkForIconExistence(guild) && {`Server + } + {guild ? guild.name : "View server"} + +
+ } +
} -
+ } { channel &&
NavigationRouter.transitionTo(`/channels/${guild_id ?? "@me"}/${channel_id}/${message_id}`)} >