mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
[mastodon-client] fix local instance mentions
This commit is contained in:
parent
a14659f19f
commit
524c8f07ec
@ -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 New Issue
Block a user