Insert domain into invite
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
notplants 2022-06-29 16:22:58 -04:00
parent 170b037248
commit 6621a09ec9
3 changed files with 10 additions and 4 deletions

4
Cargo.lock generated
View File

@ -1079,7 +1079,7 @@ dependencies = [
[[package]]
name = "golgi"
version = "0.1.4"
source = "git+https://git.coopcloud.tech/golgi-ssb/golgi.git#ca4c1114ddf328b818144c5a1af0187b1357e9be"
source = "git+https://git.coopcloud.tech/golgi-ssb/golgi#ca4c1114ddf328b818144c5a1af0187b1357e9be"
dependencies = [
"async-std",
"async-stream 0.3.3",
@ -2331,7 +2331,7 @@ dependencies = [
[[package]]
name = "peach-web"
version = "0.6.18"
version = "0.6.19"
dependencies = [
"async-std",
"base64 0.13.0",

View File

@ -1,6 +1,6 @@
[package]
name = "peach-web"
version = "0.6.18"
version = "0.6.19"
authors = ["Andrew Reid <gnomad@cryptolab.net>", "Max Fowler <max@mfowler.info>"]
edition = "2018"
description = "peach-web is a web application which provides a web interface for monitoring and interacting with the PeachCloud device. This allows administration of the single-board computer (ie. Raspberry Pi) running PeachCloud, as well as the ssb-server and related plugins."

View File

@ -157,7 +157,13 @@ pub fn create_invite(uses: u16) -> Result<String, Box<dyn Error>> {
let mut sbot_client = init_sbot_with_config(&sbot_config).await?;
debug!("Generating Scuttlebutt invite code");
let invite_code = sbot_client.invite_create(uses).await?;
let mut invite_code = sbot_client.invite_create(uses).await?;
// insert domain into invite if one is configured
let domain = config_manager::get_config_value("EXTERNAL_DOMAIN")?;
if !domain.is_empty() {
invite_code = domain + &invite_code[4..];
}
Ok(invite_code)
})