diff --git a/src/components/navigation/left/ServerSidebar.tsx b/src/components/navigation/left/ServerSidebar.tsx index 61fca6b3..83adce2a 100644 --- a/src/components/navigation/left/ServerSidebar.tsx +++ b/src/components/navigation/left/ServerSidebar.tsx @@ -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; @@ -86,6 +87,17 @@ const ServerSidebar = observer((props: Props) => { return ( { + if (e.shiftKey) { + internalEmit( + "MessageBox", + "append", + `<#${entry._id}>`, + "mention", + ); + e.preventDefault() + } + }} key={entry._id} active={active} to={`/server/${server!._id}/channel/${entry._id}`}> diff --git a/src/lib/ConditionalLink.tsx b/src/lib/ConditionalLink.tsx index b2057c4d..fbe4fdd9 100644 --- a/src/lib/ConditionalLink.tsx +++ b/src/lib/ConditionalLink.tsx @@ -9,7 +9,7 @@ export default function ConditionalLink(props: Props) { const { active, ...linkProps } = props; if (active) { - return {props.children}; + return {props.children}; } return ; }