Merge pull request #199 from brecert/mentions-methods

This commit is contained in:
Paul Makles
2021-09-09 22:00:03 +01:00
committed by GitHub
7 changed files with 138 additions and 32 deletions

View File

@@ -22,6 +22,7 @@ import { mapChannelWithUnread, useUnreads } from "./common";
import { ChannelButton } from "../items/ButtonItem";
import ConnectionStatus from "../items/ConnectionStatus";
import { internalEmit } from "../../../lib/eventEmitter";
interface Props {
unreads: Unreads;
@@ -90,6 +91,17 @@ const ServerSidebar = observer((props: Props) => {
return (
<ConditionalLink
onClick={e => {
if (e.shiftKey) {
internalEmit(
"MessageBox",
"append",
`<#${entry._id}>`,
"channel_mention",
);
e.preventDefault()
}
}}
key={entry._id}
active={active}
to={`/server/${server!._id}/channel/${entry._id}`}>