fix: do not log warning if iroh relay metadata is NIL

This commit is contained in:
link2xt
2024-05-20 18:59:19 +00:00
parent e84a5589df
commit 6fc0000c8a

View File

@@ -1472,13 +1472,15 @@ impl Session {
admin = m.value; admin = m.value;
} }
"/shared/vendor/deltachat/irohrelay" => { "/shared/vendor/deltachat/irohrelay" => {
if let Some(url) = m.value.as_deref().and_then(|s| Url::parse(s).ok()) { if let Some(value) = m.value {
iroh_relay = Some(url); if let Ok(url) = Url::parse(&value) {
} else { iroh_relay = Some(url);
warn!( } else {
context, warn!(
"Got invalid URL from iroh relay metadata: {:?}.", m.value context,
); "Got invalid URL from iroh relay metadata: {:?}.", value
);
}
} }
} }
_ => {} _ => {}