git ssb

0+

Dominic / ssb-peer-invites



Commit 20b51aaa1b5233eec015a9a8bb8d391dc58b207e

notes

Dominic Tarr committed on 4/3/2018, 5:16:45 AM
Parent: 1dab25ead4d59d2437b39d9602d78ebf2b320514

Files changed

index.jschanged
index.jsView
@@ -101,9 +101,8 @@
101101 })
102102 })
103103 })
104104
105- //first
106105 invites.getInvite = function (invite_id, cb) {
107106 var self = this
108107 invites.get(function (err, v) {
109108 var invite = v.invites[invite_id]
@@ -113,8 +112,10 @@
113112 new Error('unknown invite:'+invite_id),
114113 'unknown-invite'
115114 ))
116115 else if(invite === true)
116 + //TODO just retrive all confirmations we know about
117 + //via links.
117118 cb(code(
118119 new Error('invite already used:'+invite_id),
119120 'invite-already-used'
120121 ))
@@ -136,12 +137,14 @@
136137 invites.get(function (err, v) {
137138 var invite_id = accept.content.receipt
138139 var invite = v.invites[invite_id]
139140 if(invite === true || accepted[invite_id])
141 + //TODO: this should return the confirmation, not an error.
140142 return cb(code(
141143 new Error('invite already used:'+invite_id),
142144 'invite-already-used'
143145 ))
146 +
144147 try {
145148 I.validateAccept(accept, invite)
146149 } catch (err) {
147150 return cb(err)
@@ -158,4 +161,5 @@
158161 return invites
159162
160163 }
161164
165 +

Built with git-ssb-web