Skip to content
Snippets Groups Projects
Unverified Commit 3eef0a65 authored by nullobsi's avatar nullobsi Committed by GitHub
Browse files

fix mentions in replies (#8030)

parent bcd188a0
No related branches found
No related tags found
No related merge requests found
......@@ -289,9 +289,14 @@ export default defineComponent({
if (this.reply && this.reply.text != null) {
const ast = mfm.parse(this.reply.text);
const otherHost = this.reply.user.host;
for (const x of extractMentions(ast)) {
const mention = x.host ? `@${x.username}@${toASCII(x.host)}` : `@${x.username}`;
const mention = x.host ?
`@${x.username}@${toASCII(x.host)}` :
(otherHost == null || otherHost == host) ?
`@${x.username}` :
`@${x.username}@${toASCII(otherHost)}`;
// 自分は除外
if (this.$i.username == x.username && x.host == null) continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment