From 43b5199ebdf4da8a1c8cecfd51859ad1b37a8878 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Fri, 11 Jun 2021 21:37:11 +0200 Subject: [PATCH] Update PersonalPins.plugin.js --- Plugins/PersonalPins/PersonalPins.plugin.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Plugins/PersonalPins/PersonalPins.plugin.js b/Plugins/PersonalPins/PersonalPins.plugin.js index 398f7bb2a3..de4da65268 100644 --- a/Plugins/PersonalPins/PersonalPins.plugin.js +++ b/Plugins/PersonalPins/PersonalPins.plugin.js @@ -160,7 +160,9 @@ module.exports = (_ => { BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { tag: "span", className: BDFDB.disCN.messagespopoutchannelname, - onClick: _ => BDFDB.LibraryModules.HistoryUtils.transitionTo(BDFDB.DiscordConstants.Routes.CHANNEL(channel.guild_id, channel.id)), + onClick: _ => { + if (!channel.guild_id || BDFDB.LibraryModules.GuildStore.getGuild(channel.guild_id)) BDFDB.LibraryModules.HistoryUtils.transitionTo(BDFDB.DiscordConstants.Routes.CHANNEL(channel.guild_id, channel.id)); + }, children: channelName ? ((channel.guild_id ? "#" : "@") + channelName) : "???" }), popoutProps.selectedFilter.value == "all" ? BDFDB.ReactUtils.createElement("span", { @@ -181,7 +183,7 @@ module.exports = (_ => { BDFDB.ReactUtils.createElement("div", { className: BDFDB.disCN.messagespopoutactionbuttons, children: [ - BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { + (!channel.guild_id || BDFDB.LibraryModules.GuildStore.getGuild(channel.guild_id)) && BDFDB.ReactUtils.createElement(BDFDB.LibraryComponents.Clickable, { className: BDFDB.disCN.messagespopoutjumpbutton, onClick: _ => BDFDB.LibraryModules.HistoryUtils.transitionTo(BDFDB.DiscordConstants.Routes.CHANNEL(channel.guild_id, channel.id, message.id)), children: BDFDB.ReactUtils.createElement("div", {