[ActivityPub] Use microformats on mentions

To avoid pointless link previews.
see: https://misskey.xyz/notes/5c51ab5c2d85f2003248eddc
This commit is contained in:
syuilo 2019-01-30 22:57:32 +09:00
parent a4b1e8ca26
commit 8dc7f28744
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
2 changed files with 2 additions and 0 deletions

View file

@ -6,6 +6,7 @@ unreleased
* サイレンス機能の追加 * サイレンス機能の追加
* リプライ/メンションされていれば非フォロワーへのフォロワー限定でも参照可能に * リプライ/メンションされていれば非フォロワーへのフォロワー限定でも参照可能に
* Misskey以外のインスタンスからMisskeyの投稿を見たときに改行が多い問題を修正 * Misskey以外のインスタンスからMisskeyの投稿を見たときに改行が多い問題を修正
* Misskey以外のインスタンスからMisskeyの投稿を見たときにメンションのURLが展開されるのを修正
10.79.1 10.79.1
---------- ----------

View file

@ -137,6 +137,7 @@ export function toHtml(tokens: MfmForest, mentionedRemoteUsers: INote['mentioned
default: default:
const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username === username && remoteUser.host === host); const remoteUserInfo = mentionedRemoteUsers.find(remoteUser => remoteUser.username === username && remoteUser.host === host);
a.href = remoteUserInfo ? remoteUserInfo.uri : `${config.url}/${acct}`; a.href = remoteUserInfo ? remoteUserInfo.uri : `${config.url}/${acct}`;
a.className = 'mention';
break; break;
} }
a.textContent = acct; a.textContent = acct;