aboutsummaryrefslogtreecommitdiff
path: root/lib/serve.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-01-28 10:21:49 -0500
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2020-01-28 10:21:49 -0500
commit97da1aee50af959838fdaed3b85eb4fb47627ff0 (patch)
tree65559cea179afbc608dca79748d1a07debeedfbe /lib/serve.js
parenta36543131c127121355391b4c743f49b7280b2aa (diff)
downloadpatchfoo-97da1aee50af959838fdaed3b85eb4fb47627ff0.tar.gz
patchfoo-97da1aee50af959838fdaed3b85eb4fb47627ff0.zip
Optimize /about-diff
- Include rel/type in links query - Query only own messages for self-about (unless fromAny=1)
Diffstat (limited to 'lib/serve.js')
-rw-r--r--lib/serve.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/serve.js b/lib/serve.js
index 5736f9b..562476d 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -4033,7 +4033,7 @@ Serve.prototype.composer = function (opts, cb) {
if (!canMentionAttendees) return cb(null)
if (opts.id === opts.root) gotLinks(null, links)
else pull(
- self.app.getLinks2(opts.root, 'about'),
+ self.app.getLinksBy(opts.root, 'about'),
pull.unique('key'),
self.app.unboxMessages(),
pull.collect(gotLinks)
@@ -4375,7 +4375,9 @@ Serve.prototype.aboutDiff = function (url) {
function next(rootId, msg, cb) {
pull(
- self.app.getLinks(rootId),
+ rootId === msg.value.author && !self.query.fromAny ?
+ self.app.getLinks3(rootId, msg.value.author, 'about') :
+ self.app.getLinksBy(rootId, 'about'),
pull.unique('key'),
self.app.unboxMessages(),
pull.collect(function (err, links) {