Skip to content
Snippets Groups Projects
Commit 909985b4 authored by insert's avatar insert
Browse files

Fix message links redirecting to home page.

parent b95aa339
Branches
No related merge requests found
......@@ -171,15 +171,19 @@ export const MessageReply = observer(({ index, channel, id }: Props) => {
<div
className="content"
onClick={() => {
const channel = message.channel!;
if (
channel.channel_type === "TextChannel"
) {
console.log(
`/server/${channel.server_id}/channel/${channel._id}/${message._id}`,
);
history.push(
`/server/${channel.server_id}/channel/${channel._id}/${message._id}`,
);
} else {
history.push(
`/channel/${channel}/${message._id}`,
`/channel/${channel._id}/${message._id}`,
);
}
}}>
......
......@@ -179,7 +179,7 @@ export function MessageArea({ id }: Props) {
const channel = client.channels.get(id);
if (channel?.channel_type === "TextChannel") {
history.push(`/server/${channel.server}/channel/${id}`);
history.push(`/server/${channel.server_id}/channel/${id}`);
} else {
history.push(`/channel/${id}`);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment