fix: mention local users in replies (#7975)

* mention local users in replies

* fix merge
This commit is contained in:
nullobsi 2021-11-12 02:31:56 -08:00 committed by GitHub
parent 926eb34680
commit c038892795
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -278,8 +278,8 @@ export default defineComponent({
this.text += ' ';
}
if (this.reply && this.reply.user.host != null) {
this.text = `@${this.reply.user.username}@${toASCII(this.reply.user.host)} `;
if (this.reply && (this.reply.user.username != this.$i.username || (this.reply.user.host != null && this.reply.user.host != host))) {
this.text = `@${this.reply.user.username}${this.reply.user.host != null ? '@' + toASCII(this.reply.user.host) : ''} `;
}
if (this.reply && this.reply.text != null) {

View file

@ -206,8 +206,8 @@ export default defineComponent({
this.text += ' ';
}
if (this.reply && this.reply.user.host != null) {
this.text = `@${this.reply.user.username}@${toASCII(this.reply.user.host)} `;
if (this.reply && (this.reply.user.username != this.$i.username || (this.reply.user.host != null && this.reply.user.host != host))) {
this.text = `@${this.reply.user.username}${this.reply.user.host != null ? '@' + toASCII(this.reply.user.host) : ''} `;
}
if (this.reply && this.reply.text != null) {