Fixing identities claim to be in-line with identities discover and identities trust, by introducing a new parser parseGestaltIdentityId#29
Conversation
3eea4b1 to
8afa70a
Compare
tegefaulkes
left a comment
There was a problem hiding this comment.
The main issue is that you're using the GestaltId parser when you should only ever be parsing a IdentityId. If there is no existing parser for IdentityId for the format of provider:user then you need to make one.
Using the switch statement like that to enforce the type is a pretty weird decision. It's almost as bad as using the as keyword to narrow the type.
Remember, a quick solution that doesn't address the issue is not a good one. You need take some extra time to think through your implementation and weather it's a good one.
If you're unsure about something of can think of multiple ways to address something the you can @ someone in a the issue or PR with a question. it also helps to think out loud in the issues or PRs when working.
|
Remember, don't resolve review comments until you have committed and pushed the change. It's really confusing on my end if its resolved with no changes. |
ImportantThis PR needs MatrixAI/Polykey#595 to be merged in Polykey to work. |
11b657e to
523cd8e
Compare
|
@tegefaulkes this PR was finished reviewing by Roger and you. Think you can merge it |
|
This is not technically finished if it's waiting for a new version of Polykey to be released. All tests need to be passing as well. |
|
The |
|
I've reverted that change now. I'll finish off this PR at @CMCDragonkai 's request |
523cd8e to
1769ec9
Compare
3e9d0ba to
2f33fd8
Compare
|
This is done now, I'm merging. |

Description
The
pk identities claimcurrently takes two parameters in order to claim an identity.This is not consistent with other two commands
trustanddiscover.These two commands are not using the
ProviderIdentityIdtype.This is because the encoded form of this type is
["github.com", "cmcdragonkai"].Instead we need to use a parser similar to
binParsers.parseGestaltId(which is used by the trust and discover commands), however this parser, parses both node IDs and identities.What we need to do is to extract the identity parsing portion of
binParsers.parseGestaltId.It will be:
This will be called
parseGestaltIdentityId.Issues Fixed
Tasks
Final checklist