diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-11-25 20:07:18 -0700 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-11-25 20:13:41 -0700 |
commit | f51983b5e78e1dd23ae6482b97679a5618560429 (patch) | |
tree | b36fdcfb0bb4045b57427f186bab4a2a937d03df /lib/app.js | |
parent | 59bfa01faf1939dc6b327b05439cb0b23cfddcfa (diff) | |
download | patchfoo-f51983b5e78e1dd23ae6482b97679a5618560429.tar.gz patchfoo-f51983b5e78e1dd23ae6482b97679a5618560429.zip |
Use ssb-contact again, with block(er)s
It streams the friends list rather than buffering it
Diffstat (limited to 'lib/app.js')
-rw-r--r-- | lib/app.js | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -6,7 +6,7 @@ var u = require('./util') var pull = require('pull-stream') var multicb = require('multicb') var paramap = require('pull-paramap') -var getContacts = require('./contact') +var Contacts = require('ssb-contact') var About = require('./about') var Serve = require('./serve') var Render = require('./render') @@ -51,7 +51,6 @@ function App(sbot, config) { sbot.blobs.size.bind(sbot.blobs)) this.getFollows = memo(this._getFollows.bind(this)) this.getVotes = memo({cache: lru(100)}, this._getVotes.bind(this)) - this.getContacts = getContacts.bind(null, this.sbot) this.unboxMsg = this.unboxMsg.bind(this) @@ -465,6 +464,10 @@ App.prototype.streamMyChannels = function (id, opts) { ) } +App.prototype.createContactStreams = function (id) { + return new Contacts(this.sbot).createContactStreams(id) +} + function compareVoted(a, b) { return b.value - a.value } |