aboutsummaryrefslogtreecommitdiff
path: root/lib/util.js
diff options
context:
space:
mode:
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'
+}