git ssb

2+

Dominic / ssb-client



Commit c00eb7b5539d007fd4b13257e728664de6831106

add getLatest to publish

Paul Frazee committed on 3/5/2015, 2:27:00 AM
Parent: 6f08d9afa56813ff9dec9f01b4be2719ed36a373

Files changed

index.jschanged
index.jsView
@@ -61,12 +61,12 @@
6161 })
6262 }
6363
6464 client.publish = function (content, cb) {
65- // :TODO: get prev
66- var prev = null
67- var msg = createMsg(client.keys, null, content, prev)
68- rpc.add(msg, cb)
65 + rpc.getLatest(function (err, prev) {
66 + var msg = createMsg(client.keys, null, content, prev||null)
67 + rpc.add(msg, cb)
68 + })
6969 }
7070
7171 client.auth = function (cb) {
7272 var authReq = ssbKeys.signObj(client.keys, {

Built with git-ssb-web