check for env variable and option for message

This commit is contained in:
botanicvelious 2023-01-17 05:56:07 -07:00 committed by GitHub
parent 42d5ca2419
commit 67db6bfeb7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -243,10 +243,11 @@ pub fn set_peer_option(id: String, name: String, value: String) {
#[inline]
pub fn using_public_server() -> bool {
if hbb_common::config::RS_PUB_KEY == "OeVuKk5nlHiXp+APNn0Y3pC1Iwpwn44JGqrQCsWqmBw=" {
return true
let key_check: Option<&'static str> = option_env!("RS_PUB_KEY_VAL");
if key_check != "None" and crate::get_custom_rendezvous_server(get_option_("custom-rendezvous-server")).is_empty() {
return False;
} else {
return false
return True;
}
}