Add VoiceChannel support.

This commit is contained in:
Paul
2021-06-23 13:52:16 +01:00
parent 5df1c463a3
commit babb53c794
12 changed files with 123 additions and 59 deletions

View File

@@ -22,13 +22,14 @@ interface Props {
head?: boolean
}
export default function Message({ attachContext, message, contrast, content: replacement, head, queued }: Props) {
export default function Message({ attachContext, message, contrast, content: replacement, head: preferHead, queued }: Props) {
// TODO: Can improve re-renders here by providing a list
// TODO: of dependencies. We only need to update on u/avatar.
const user = useUser(message.author);
const client = useContext(AppContext);
const content = message.content as string;
const head = (message.replies && message.replies.length > 0) || preferHead;
return (
<MessageBase id={message._id}
head={head}