Add helper to publish pub address #22

Open
opened 2022-01-31 09:40:04 +00:00 by glyph · 0 comments
Owner

I realised while looking at invite creation that it'd be nice to have a golgi helper function for specifying the pub address data.

use kuska_ssb::api::dto::content::PubAddress;

// publish a pub address message (in order to test accepting invite from other client)
let pub_address_msg = SsbMessageContent::Pub {
    address: Some(PubAddress {
    host: Some("glyph_pi.dyn.peachcloud.org".to_string()),
    port: 8009,
    key: id,
    }),
};

let pub_msg_ref = sbot_client.publish(pub_address_msg).await?;

Invite code in this case would look something like this:

net:glyph_pi.dyn.peachcloud.org:8009:@1vxS6DMi7z9uJIQG33W7mlsv21GZIbOpmWE1QEcn9oY=.ed25519~5hpbpHzzBKAOm8IpH9K5rDZBaMcN+ljDfJwKrRobimo=

I realised while looking at invite creation that it'd be nice to have a golgi helper function for specifying the pub address data. ```rust use kuska_ssb::api::dto::content::PubAddress; // publish a pub address message (in order to test accepting invite from other client) let pub_address_msg = SsbMessageContent::Pub { address: Some(PubAddress { host: Some("glyph_pi.dyn.peachcloud.org".to_string()), port: 8009, key: id, }), }; let pub_msg_ref = sbot_client.publish(pub_address_msg).await?; ``` Invite code in this case would look something like this: `net:glyph_pi.dyn.peachcloud.org:8009:@1vxS6DMi7z9uJIQG33W7mlsv21GZIbOpmWE1QEcn9oY=.ed25519~5hpbpHzzBKAOm8IpH9K5rDZBaMcN+ljDfJwKrRobimo=`
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: golgi-ssb/golgi#22
No description provided.