ssbc / ssb-private-group-keys

GNU Lesser General Public License v3.0
2 stars 0 forks source link

Uri support #14

Closed mixmix closed 2 years ago

mixmix commented 2 years ago

I feel really gross about this. I want this module to support URI's but don't know of a nice general way to do it.

staltz commented 2 years ago

Hey Mix, I don't understand what problem this solution is solving. Can you give me a bit more context?

mixmix commented 2 years ago

@staltz the problem is if someone says I want a shared DM key for @mix1q23213123=.ed25519 then we have a method that handles that, but if you ask for a sharedDMKey with ssb:feed/ed25519/asdasdasdasdasdasdas= then this method crashes with Error cannot encode type: feed, format: ed25519, "format" is unknown (or something like that)

I want all feeds to be expressible as URI (if people want), and so I want classic feeds to be able to be inputs to methods like this "get me a shared DM key with this feed" method.

staltz commented 2 years ago

Ok, how does bendybutt SSB URIs behave with this module? Because I think we strictly need to support that but we don't strictly need to support ssb:feed/ed25519 although it's nice.

staltz commented 2 years ago

You can try using https://github.com/ssbc/ssb-uri2/pull/10 by using "ssb-uri2": "ssbc/ssb-uri2#classic-uri" in the package.json

@mixmix ssb-uri2@2.0.0

mixmix commented 2 years ago

@staltz updated, hack removed! :heart: :kissing:

This PR is now less janky! Ready for final review

mixmix commented 2 years ago

@staltz I'm assuming this is fine to merge because you thumbs-up the content about me making the changes.

staltz commented 2 years ago

@mixmix Generally "fine to merge" is signaled by the approval UI in GitHub.

mixmix commented 2 years ago

Ok changes made. I am unclear if you want more rounds of approval, even though I've executed the change requested. Because you said you wanted the new dependancy installed in ssb-keyring....

but then you said:

Generally "fine to merge" is signaled by the approval UI in GitHub.

But you said you needed 2 hours of work... and this didn't take long.

I dunno what our process here is. All teams I've been part of for the last years would trust that things had been addressed, and if they have them merging is fine. So I am going to merge this and publish a version of this, and if that was surprising please read that we're not yet clear and I'm doing my best to figure it out