Parcourir la source

More explicit error message for users who have failed to generate their own key pair (#235)

* More explicit error message for users who have failed to generate their own key pair.

* Tweaked error message.

---------

Co-authored-by: dark-john <dark-john@fake-email.com>
dark-john il y a 2 ans
Parent
commit
4da0207bbd
2 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 1 1
      bin/darkirc/darkirc_config.toml
  2. 1 1
      bin/darkirc/src/settings.rs

+ 1 - 1
bin/darkirc/darkirc_config.toml

@@ -109,7 +109,7 @@ topic = "/b/"
 ## It is also recommended to paste the public key here as a comment in
 ## order to be able to easily reference it for sharing.
 ##
-## You can generate a keypair with: darkirc --gen-keypair
+## You can generate a keypair with: darkirc --gen-chacha-keypair
 ## and replace the secret key below with the generated one.
 ## **You should never share this secret key with anyone**
 #[crypto]

+ 1 - 1
bin/darkirc/src/settings.rs

@@ -106,7 +106,7 @@ pub fn parse_configured_contacts(data: &toml::Value) -> Result<HashMap<String, I
     };
 
     let Some(secret) = parse_dm_chacha_secret(data)? else {
-        return Err(ParseFailed("Did not find a valid chacha secret"))
+        return Err(ParseFailed("You have specified some contacts but you did not set up a valid chacha secret for yourself.  You can generate a keypair with: 'darkirc --gen-chacha-keypair' and then add that keypair to your config toml file."))
     };
 
     for (name, items) in contacts {