From 7570f001cc8ddeff88ebdab640e06a0b1b03974c Mon Sep 17 00:00:00 2001 From: cel Date: Thu, 4 May 2017 11:03:16 -1000 Subject: wip: about --- lib/util.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lib/util.js') 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' +} -- cgit v1.2.3