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,15 +1472,17 @@ 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 {
if let Ok(url) = Url::parse(&value) {
iroh_relay = Some(url); iroh_relay = Some(url);
} else { } else {
warn!( warn!(
context, context,
"Got invalid URL from iroh relay metadata: {:?}.", m.value "Got invalid URL from iroh relay metadata: {:?}.", value
); );
} }
} }
}
_ => {} _ => {}
} }
} }