Add publish-address function to peach-config #130
Reference in New Issue
Block a user
No description provided.
Delete Branch "publish-address"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Based on this issue #127 (comment),
this PR adds a command to peach-config:
peach-config publish-address -a host:portthat creates a Pub address message with go-sbot,
which gossips the address to peers,
and is used for inserting into generating invites
This PR depends on this PR in golgi to give access to PubAddress:
golgi-ssb/golgi#50
cargo-clippy will continue to fail here in the CI until this golgi PR is merged
Looks good to me overall. I just have one requested change related to subcommand naming.
@ -58,0 +59,4 @@/// Publish domain and port./// It takes an address argument of the form host:port#[structopt(name = "publish-address")]I recommend picking a single convention for multi-word flags to keep the CLI API consistent. There is
changepasswordand nowpublish-address. I don't have a strong preference (either no space or hyphen).agreed, will change both to use hyphens
@glyph in order to make this code compile, I needed to delete the Cargo.lock file (which we wanted to get rid of anyway) so that it would actually use the latest version of golgi (and not the version that was in Cargo.lock). Once using the latest golgi, it unearthed a small mismatch in peach-web where it was still using the old history stream api before your update to golgi (from SsbMessageValue to SsbMessageKVT), so I have also included a fix to this in peach-web in this PR, which maps the vec of SsbMessageKVT to a vec of SsbMessageValue
@notplants
I hope you don't mind me pushing to your PR 🙏
Two changes I've made:
Remove
Cargo.lockfrom.gitignore. We want to keep the lockfile inpeach-workspaceto ensure that all crates are using the same version of all dependencies.golgiwas a different story, since it's a standalone library (and therefore should not have the lockfile included in the repo).I've removed the
.mapyou added to transform the vec ofSsbMessageKVTto a vec ofSsbMessageValue. Instead, I just queried thekvtdirectly by adding.value(msgs[0].value.sequence). This way should be more performant. Sorry you had to bump into this mismatch...I didn't think about that when making the change.I'm still waiting for the CI to complete but it should be good to go soon :)
🟢