mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-25 07:02:10 -05:00
Fix message links redirecting to home page.
This commit is contained in:
parent
b95aa3391a
commit
909985b47d
2 changed files with 6 additions and 2 deletions
|
@ -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}`);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue