From a28f9dbb28295200e56066ac3ae75bc97b74669b Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 10 Dec 2018 10:45:59 -1000 Subject: Handle missing rpc methods --- lib/follows.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/follows.js') diff --git a/lib/follows.js b/lib/follows.js index b262520..e1febc7 100644 --- a/lib/follows.js +++ b/lib/follows.js @@ -12,7 +12,8 @@ function Follows(sbot, contacts) { var followsCache = lru(100) this.getFollows = memo({cache: followsCache}, this.getFollows) - pull( + if (!sbot.messagesByType) console.error('missing messagesByType') + else pull( sbot.messagesByType({type: 'contact', old: false}), pull.drain(function (msg) { var author = msg && msg.value && msg.value.author -- cgit v1.2.3