aboutsummaryrefslogtreecommitdiff
path: root/lib/util.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-04 11:03:16 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-04 12:21:14 -1000
commit7570f001cc8ddeff88ebdab640e06a0b1b03974c (patch)
treec8394624a998ea5823dec79656ccc2e4f8c3c8c9 /lib/util.js
parent49d72723ed74ac04099a46e2aae2ef68432ba210 (diff)
downloadpatchfoo-7570f001cc8ddeff88ebdab640e06a0b1b03974c.tar.gz
patchfoo-7570f001cc8ddeff88ebdab640e06a0b1b03974c.zip
wip: about
Diffstat (limited to 'lib/util.js')
-rw-r--r--lib/util.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/util.js b/lib/util.js
index 0a6356c..2c0cf03 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -103,3 +103,13 @@ u.extractFeedIds = function (str) {
})
return ids
}
+
+u.isMsgReadable = function (msg) {
+ var c = msg && msg.value && msg.value.content
+ return typeof c === 'object' && c !== null
+}
+
+u.isMsgEncrypted = function (msg) {
+ var c = msg && msg.value.content
+ return typeof c === 'string'
+}