From 22c9b2a241735a70f76473b4bb37fe530219e31c Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 6 Apr 2017 16:31:52 -0700 Subject: Ignore duplicate mentions --- lib/serve.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/serve.js b/lib/serve.js index 7180f7a..ca6b2ae 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -971,6 +971,7 @@ Serve.prototype.composer = function (opts, cb) { var myId = self.app.sbot.id var content var unknownMentions = [] + var unknownMentionNames = {} try { content = JSON.parse(data.text) } catch (err) { @@ -991,6 +992,8 @@ Serve.prototype.composer = function (opts, cb) { } else if (mention.link === '@') { // bare feed name var name = mention.name + if (unknownMentionNames[name]) return false + unknownMentionNames[name] = true var fullName = mention.link + name var id = formNames[name] || self.app.getReverseNameSync(fullName) unknownMentions.push({name: name, fullName: fullName, id: id}) -- cgit v1.2.3