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;
}
"/shared/vendor/deltachat/irohrelay" => {
if let Some(url) = m.value.as_deref().and_then(|s| Url::parse(s).ok()) {
iroh_relay = Some(url);
} else {
warn!(
context,
"Got invalid URL from iroh relay metadata: {:?}.", m.value
);
if let Some(value) = m.value {
if let Ok(url) = Url::parse(&value) {
iroh_relay = Some(url);
} else {
warn!(
context,
"Got invalid URL from iroh relay metadata: {:?}.", value
);
}
}
}
_ => {}