feat: render nostr mentions in chat

This commit is contained in:
2023-07-30 23:02:11 +02:00
parent efd2f756fe
commit 7583fa1fd4
8 changed files with 100 additions and 40 deletions

View File

@ -14,7 +14,7 @@ import { EmojiPicker } from "./emoji-picker";
import { Icon } from "./icon";
import { Emoji } from "./emoji";
import { Profile } from "./profile";
import { Text } from "./text";
import { Markdown } from "./markdown";
import { SendZapsDialog } from "./send-zap";
import { findTag } from "../utils";
import type { EmojiPack } from "../hooks/emoji";
@ -151,7 +151,12 @@ export function ChatMessage({
pubkey={ev.pubkey}
profile={profile}
/>
<Text tags={ev.tags} content={ev.content} />
<Markdown
element="span"
enableParagraphs={false}
tags={ev.tags}
content={ev.content}
/>
{(hasReactions || hasZaps) && (
<div className="message-reactions">
{hasZaps && (