Commit cb6fe8cf24dfda94e22f981ad9074b4edae061df
callback only one argument
Dominic Tarr committed on 7/5/2019, 11:04:02 AMParent: bce59c4f224d391e32a96cf60834cc9707a0a871
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -449,9 +449,13 @@ | ||
449 | 449 … | //UPDATE REDUCE STATE. |
450 | 450 … | // this is a wee bit naughty, because if you rebuild the index it might not have this invite |
451 | 451 … | // (until you replicate it, but when you do the value won't change) |
452 | 452 … | state.set(reduce(state.value, {key: invite_id, value:msg}, invites.since.value)) |
453 | - cb(null, msg, opened) | |
453 … | + cb(null, { | |
454 … | + key: invite_id, | |
455 … | + value: msg, | |
456 … | + opened: opened | |
457 … | + }) | |
454 | 458 … | } |
455 | 459 … | }) |
456 | 460 … | } |
457 | 461 … | |
@@ -465,9 +469,12 @@ | ||
465 | 469 … | //or if the acceptance has been publish, but not yet confirmed. |
466 | 470 … | getAccept(invite_id, function (err, accept) { |
467 | 471 … | if(accept) next(accept) |
468 | 472 … | else { |
469 | - invites.openInvite(invite, function (err, invite_msg, opened) { | |
473 … | + invites.openInvite(invite, function (err, data) { | |
474 … | + if(err) return cb(err) | |
475 … | + var invite_msg = data.value | |
476 … | + var opened = data.opened | |
470 | 477 … | sbot.identities.publishAs({ |
471 | 478 … | id: id, |
472 | 479 … | content: I.createAccept(invite_msg, invite.seed, id, caps) |
473 | 480 … | }, function (err, accept) { |
Built with git-ssb-web