Fix message links from search.

This commit is contained in:
Paul
2021-07-31 22:39:15 +01:00
parent f20f1d8b41
commit 5c100b212e
5 changed files with 44 additions and 3 deletions

View File

@@ -298,10 +298,10 @@ function Search({ channel }: { channel: Channel }) {
{results.map((message) => {
let href = "";
if (channel?.channel_type === "TextChannel") {
href += `/server/${channel.server}`;
href += `/server/${channel.server_id}`;
}
href += `/channel/${message.channel}/${message._id}`;
href += `/channel/${message.channel_id}/${message._id}`;
return (
<Link to={href}>