Remove duplicate mentions when preparing reply
This commit is contained in:
parent
685ca20bb2
commit
88bdd69233
1 changed files with 2 additions and 0 deletions
|
@ -150,6 +150,8 @@ export default class PostEditor extends Vue {
|
||||||
this.content = mentions
|
this.content = mentions
|
||||||
.filter(mention => mention.id !== this.store.currentUser?.id)
|
.filter(mention => mention.id !== this.store.currentUser?.id)
|
||||||
.map(mention => "@" + this.store.getActorAddress(mention))
|
.map(mention => "@" + this.store.getActorAddress(mention))
|
||||||
|
// Remove duplicates
|
||||||
|
.filter((mention, index, mentions) => mentions.indexOf(mention) === index)
|
||||||
.join(" ")
|
.join(" ")
|
||||||
}
|
}
|
||||||
if (this.inReplyTo && this.inReplyTo.visibility !== Visibility.Public) {
|
if (this.inReplyTo && this.inReplyTo.visibility !== Visibility.Public) {
|
||||||
|
|
Loading…
Reference in a new issue