aboutsummaryrefslogtreecommitdiff
path: root/lib/follows.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-12-10 10:45:59 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2018-12-10 10:45:59 -1000
commita28f9dbb28295200e56066ac3ae75bc97b74669b (patch)
treebc981f3f7e8c0d60a1559782b0f35aba6b1d9a98 /lib/follows.js
parentdee0312beda7583df48e969e27efc4e1865edc71 (diff)
downloadpatchfoo-a28f9dbb28295200e56066ac3ae75bc97b74669b.tar.gz
patchfoo-a28f9dbb28295200e56066ac3ae75bc97b74669b.zip
Handle missing rpc methods
Diffstat (limited to 'lib/follows.js')
-rw-r--r--lib/follows.js3
1 files changed, 2 insertions, 1 deletions
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