chore: always add prefix on encode

This commit is contained in:
2023-10-18 09:50:26 +01:00
parent 81df18ea4e
commit a081f9655e
6 changed files with 22 additions and 20 deletions

View File

@ -203,6 +203,7 @@ export function NoteInner(props: NoteProps) {
const pubMentions =
mentions.length > maxMentions ? mentions?.slice(0, maxMentions).map(renderMention) : mentions?.map(renderMention);
const others = mentions.length > maxMentions ? formatMessage(messages.Others, { n: othersLength }) : "";
const link = replyLink?.encode(CONFIG.eventLinkPrefix);
return (
<div className="reply">
re:&nbsp;
@ -211,7 +212,7 @@ export function NoteInner(props: NoteProps) {
{pubMentions} {others}
</>
) : (
replyLink && <Link to={`/${replyLink.encode()}`}>{replyLink.encode().substring(0, 12)}</Link>
replyLink && <Link to={`/${link}`}>{link?.substring(0, 12)}</Link>
)}
</div>
);