mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
refactor(federation): 🔥 Refactor Note federation and creation code
This commit is contained in:
parent
54b2dfb78d
commit
f79b0bc999
19 changed files with 243 additions and 354 deletions
|
|
@ -301,7 +301,7 @@ export const replaceTextMentions = (text: string, mentions: User[]): string => {
|
|||
const linkTemplate = (displayText: string): string =>
|
||||
`<a class="u-url mention" rel="nofollow noopener noreferrer" target="_blank" href="${uri}">${displayText}</a>`;
|
||||
|
||||
if (mention.isRemote()) {
|
||||
if (mention.remote) {
|
||||
return finalText.replaceAll(
|
||||
`@${username}@${instance?.baseUrl}`,
|
||||
linkTemplate(`@${username}@${instance?.baseUrl}`),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue