aboutsummaryrefslogtreecommitdiff
path: root/lib/util.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-02-01 19:09:25 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2019-02-01 19:13:11 -1000
commita2d4c76879dc8c1aa10befd838f309c2e6daae15 (patch)
tree45f2e09ad1aa53f4738dfad6f27a7979a505ca98 /lib/util.js
parent0bc0c09ad6d0755d5978a4706fab8f0de26abe8e (diff)
downloadpatchfoo-a2d4c76879dc8c1aa10befd838f309c2e6daae15.tar.gz
patchfoo-a2d4c76879dc8c1aa10befd838f309c2e6daae15.zip
Support sbot built-in unboxing
This allows rendering private messages without the ssb-private plugin or old scuttlebot built-in private plugin /private is removed from default nav if there is no ssb-private plugin, because it emulates private.read by filtering the main log, which is inefficient/slow.
Diffstat (limited to 'lib/util.js')
-rw-r--r--lib/util.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/util.js b/lib/util.js
index 52c608b..5bd5f11 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -142,8 +142,8 @@ u.isMsgReadable = function (msg) {
}
u.isMsgEncrypted = function (msg) {
- var c = msg && msg.value.content
- return typeof c === 'string'
+ var value = msg && msg.value
+ return value && (value.private || typeof value.content === 'string')
}
u.pullConcat = function (cb) {