Skip to content

Commit

Permalink
fix: mention local users in replies (#7975)
Browse files Browse the repository at this point in the history
* mention local users in replies

* fix merge
  • Loading branch information
nullobsi authored Nov 12, 2021
1 parent 926eb34 commit c038892
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/client/src/components/post-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions packages/client/src/ui/chat/post-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c038892

Please sign in to comment.