diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-08-25 17:18:08 -0700 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-08-25 17:25:58 -0700 |
commit | 44097bb3a8ed88e414eda8c62a390034e9c83cbd (patch) | |
tree | c859ae578020ebd2626ee2cc1370f8b9e9503dfe | |
parent | fc9a0a9381d5be936e2349d4fd655094bf7e500c (diff) | |
download | patchfoo-44097bb3a8ed88e414eda8c62a390034e9c83cbd.tar.gz patchfoo-44097bb3a8ed88e414eda8c62a390034e9c83cbd.zip |
Handle private messages better in /about/
-rw-r--r-- | lib/about.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/about.js b/lib/about.js index ecaab28..1e41691 100644 --- a/lib/about.js +++ b/lib/about.js @@ -13,9 +13,11 @@ function About(app, myId, follows) { About.prototype.createAboutOpStream = function (id) { return pull( - this.app.sbot.links({dest: id, rel: 'about', values: true, reverse: true}), + this.app.sbot.links({dest: id, rel: 'about', values: true, reverse: true, private: true, meta: false}), + this.app.unboxMessages(), pull.map(function (msg) { - var c = msg.value.content || {} + var c = msg.value.content + if (typeof c !== 'object' || c === null) return [] return Object.keys(c).filter(function (key) { return key !== 'about' && key !== 'type' @@ -92,6 +94,8 @@ About.prototype.get = function (dest, cb) { rel: 'about', dest: dest, values: true, + private: true, + meta: false }) ]), self.app.unboxMessages(), |