mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-29 13:27:31 -07:00
[mastodon-client] fix local instance mentions
This commit is contained in:
parent
a14659f19f
commit
524c8f07ec
1 changed files with 2 additions and 0 deletions
|
@ -1281,6 +1281,8 @@ export default class Misskey implements MegalodonInterface {
|
|||
|
||||
status.mentions = (await this.getMentions(status.plain_content!, cache)).filter(p => p != null);
|
||||
for (const m of status.mentions.filter((value, index, array) => array.indexOf(value) === index)) {
|
||||
if (m.acct == m.username)
|
||||
status.content = status.content.replace(`@${m.acct}@${this.baseUrlToHost(this.baseUrl)}`, `@${m.acct}`);
|
||||
status.content = status.content.replace(`@${m.acct}`, `<a href="${m.url}" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@${m.acct}</a>`);
|
||||
}
|
||||
return status;
|
||||
|
|
Loading…
Reference in a new issue