There was an error while loading. Please reload this page.
1 parent 1086876 commit 7a4eae6Copy full SHA for 7a4eae6
1 file changed
src/components/messaging/Markdown.tsx
@@ -99,7 +99,10 @@ function Anchor(props: JSX.HTMLAttributes<HTMLAnchorElement> & { isImage?: boole
99
if (parsed && snowflakes.modelType(parsed) === snowflakes.ModelType.Message) {
100
// If we're already in the same channel, just update the message ID
101
if (pathParts[pathParts.length - 2] === params.channelId) {
102
- navigate(`/guilds/${params.guildId}/${params.channelId}/${messageId}`, { replace: true })
+ const url = !!params.guildId
103
+ ? `/guilds/${params.guildId}/${params.channelId}/${messageId}`
104
+ : `/dms/${params.channelId}/${messageId}`;
105
+ navigate(url, { replace: true })
106
} else {
107
// Otherwise navigate to the full path
108
navigate(url.pathname + url.search + url.hash)
0 commit comments