mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-22 08:53:48 +01:00
fix mentions in replies (#8030)
This commit is contained in:
parent
876a2394e5
commit
562be72a2a
@ -289,9 +289,14 @@ export default defineComponent({
|
|||||||
|
|
||||||
if (this.reply && this.reply.text != null) {
|
if (this.reply && this.reply.text != null) {
|
||||||
const ast = mfm.parse(this.reply.text);
|
const ast = mfm.parse(this.reply.text);
|
||||||
|
const otherHost = this.reply.user.host;
|
||||||
|
|
||||||
for (const x of extractMentions(ast)) {
|
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;
|
if (this.$i.username == x.username && x.host == null) continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user