upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/sub_commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/sub_commands')
-rw-r--r--src/sub_commands/init.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sub_commands/init.rs b/src/sub_commands/init.rs
index 4f098c0..56129a6 100644
--- a/src/sub_commands/init.rs
+++ b/src/sub_commands/init.rs
@@ -1,5 +1,5 @@
1use anyhow::{Context, Result}; 1use anyhow::{Context, Result};
2use nostr::{secp256k1::XOnlyPublicKey, FromBech32, ToBech32}; 2use nostr::{FromBech32, PublicKey, ToBech32};
3 3
4use super::send::send_events; 4use super::send::send_events;
5#[cfg(not(test))] 5#[cfg(not(test))]
@@ -163,7 +163,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
163 args.web.clone() 163 args.web.clone()
164 }; 164 };
165 165
166 let maintainers: Vec<XOnlyPublicKey> = { 166 let maintainers: Vec<PublicKey> = {
167 let mut dont_ask = !args.other_maintainers.is_empty(); 167 let mut dont_ask = !args.other_maintainers.is_empty();
168 let mut maintainers_string = if !args.other_maintainers.is_empty() { 168 let mut maintainers_string = if !args.other_maintainers.is_empty() {
169 [args.other_maintainers.clone()].concat().join(" ") 169 [args.other_maintainers.clone()].concat().join(" ")
@@ -185,7 +185,7 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
185 }; 185 };
186 // add current user if not present 186 // add current user if not present
187 if maintainers.iter().any(|m| { 187 if maintainers.iter().any(|m| {
188 if let Ok(m_pubkey) = XOnlyPublicKey::from_bech32(m) { 188 if let Ok(m_pubkey) = PublicKey::from_bech32(m) {
189 user_ref.public_key.eq(&m_pubkey) 189 user_ref.public_key.eq(&m_pubkey)
190 } else { 190 } else {
191 false 191 false
@@ -210,9 +210,9 @@ pub async fn launch(cli_args: &Cli, args: &SubCommandArgs) -> Result<()> {
210 .map(std::string::ToString::to_string) 210 .map(std::string::ToString::to_string)
211 .collect(); 211 .collect();
212 } 212 }
213 let mut maintainers: Vec<XOnlyPublicKey> = vec![]; 213 let mut maintainers: Vec<PublicKey> = vec![];
214 for m in maintainers_string.split(' ') { 214 for m in maintainers_string.split(' ') {
215 if let Ok(m_pubkey) = XOnlyPublicKey::from_bech32(m) { 215 if let Ok(m_pubkey) = PublicKey::from_bech32(m) {
216 maintainers.push(m_pubkey); 216 maintainers.push(m_pubkey);
217 } else { 217 } else {
218 println!("not a valid set of npubs seperated by a space"); 218 println!("not a valid set of npubs seperated by a space");