diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-06-14 11:03:59 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2017-06-14 11:09:17 -1000 |
commit | 7fe3cad4b29b4cac33766b12b9e49fbcf38bec25 (patch) | |
tree | a140e23dee4b1337e53f9f9392d8dc78b806d021 /lib | |
parent | 47dda2fa1ff7e9e2cc281278bf33e79e46a38873 (diff) | |
download | patchfoo-7fe3cad4b29b4cac33766b12b9e49fbcf38bec25.tar.gz patchfoo-7fe3cad4b29b4cac33766b12b9e49fbcf38bec25.zip |
Move blobs.add hack into ssb-party
Requires ssb-party v0.5.0: %JUEZmqElq3NF0kRnJ9c4dwhWi6sNEOfXeYVSTKK4BeM=.sha256
Running patchfoo as a scuttlebot plugin should be unaffected, because the hack
is not needed in that case.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/app.js | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -4,7 +4,6 @@ var lru = require('hashlru') var pkg = require('../package') var u = require('./util') var pull = require('pull-stream') -var hasher = require('pull-hash/ext/ssb') var multicb = require('multicb') var paramap = require('pull-paramap') var Contacts = require('ssb-contact') @@ -184,16 +183,7 @@ App.prototype.wantSizeBlob = function (id, cb) { } App.prototype.addBlob = function (cb) { - var done = multicb({pluck: 1, spread: true}) - var hashCb = done() - var addCb = done() - done(function (err, hash, add) { - cb(err, hash) - }) - return pull( - hasher(hashCb), - this.sbot.blobs.add(addCb) - ) + return this.sbot.blobs.add(cb) } App.prototype.pushBlob = function (id, cb) { |