-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add groupkey in init msg #62
Conversation
findOrCreateGroupFeed(null, function gotGroupFeed(err, groupFeed) { | ||
// prettier-ignore | ||
if (err) return cb(clarify(err, 'Failed to find or create group feed when creating a group')) | ||
|
||
const secret = secretKeyFromPurpose(groupFeed.purpose) | ||
const secret = secretKeyFromString(groupFeed.purpose) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a big deal, but a small suggestion:
const secret = secretKeyFromString(groupFeed.purpose) | |
const groupKey = secretKeyFromString(groupFeed.purpose) |
We seem to be going back and forth with this naming, "secret" or "group key", but we could try to be at least internally consistent (all namings of this thing in ssb-tribes2 are the same).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Problem here is the spec calls it groupKey and the tribes2 api says secret. I think the proper way for fixing is a separate issue/pr.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this pr is just for conforming to the spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay!
groupInitMsg, | ||
groupKey: secret.toBuffer(), | ||
}), | ||
secret: secret.toBuffer(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, could name this groupKey
) | ||
|
||
ssb.box2.addGroupInfo(data.id, { | ||
key: data.secret, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Case in point: the key is the secret is the key is the secret.
Tests need to be updated, they are failing just because the new field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
for #40