aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/serve.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/serve.js b/lib/serve.js
index b80bd71..37d93eb 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -1447,6 +1447,7 @@ Serve.prototype.editGathering = function (url) {
var attendeeMentions = mentionAttendees ? attendeeIds.filter(function (id) {
return id !== selfId
}) : []
+ var previousMentions = u.toLinkArray(about.mentions).map(u.linkDest)
var additionalMentions = data.mentions ?
u.extractRefs(data.mentions).filter(uniques()) : []
var mentions = attendeeMentions.concat(additionalMentions)
@@ -1469,7 +1470,8 @@ Serve.prototype.editGathering = function (url) {
var textMentions = ssbMentions(description, {bareFeedNames: false, emoji: false})
// don't mention ids already mentioned in the thread
textMentions.forEach(function (link) {
- if (mentions.indexOf(link.link) === -1) {
+ if (mentions.indexOf(link.link) === -1
+ && previousMentions.indexOf(link.link) === -1) {
mentions.push(reduceLink(link))
}
})