Add publish-address function to peach-config #130
No reviewers
Labels
No Label
bug
documentation
duplicate
enhancement
help wanted
invalid
maintenance
peach-lib
peach-network
peach-oled
peach-stats
peach-web
question
refactor
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: PeachCloud/peach-workspace#130
Loading…
Reference in New Issue
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:port
that 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
changepassword
and 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.lock
from.gitignore
. We want to keep the lockfile inpeach-workspace
to ensure that all crates are using the same version of all dependencies.golgi
was a different story, since it's a standalone library (and therefore should not have the lockfile included in the repo).I've removed the
.map
you added to transform the vec ofSsbMessageKVT
to a vec ofSsbMessageValue
. Instead, I just queried thekvt
directly 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 :)
🟢