diff --git a/crates/syn2mas/src/migration.rs b/crates/syn2mas/src/migration.rs index 4f6b78e0a..e4c92a8f5 100644 --- a/crates/syn2mas/src/migration.rs +++ b/crates/syn2mas/src/migration.rs @@ -414,7 +414,9 @@ async fn migrate_devices( // As we're using a real IP type in the MAS database, it is possible // that we encounter invalid IP addresses in the Synapse database. // In that case, we should ignore them, but still log a warning. - let last_active_ip = ip.and_then(|ip| { + // One special case: Synapse will record '-' as IP in some cases, we don't want + // to log about those + let last_active_ip = ip.filter(|ip| ip != "-").and_then(|ip| { ip.parse() .map_err(|e| { tracing::warn!( diff --git a/crates/syn2mas/src/synapse_reader/mod.rs b/crates/syn2mas/src/synapse_reader/mod.rs index 63e0719b4..30257657a 100644 --- a/crates/syn2mas/src/synapse_reader/mod.rs +++ b/crates/syn2mas/src/synapse_reader/mod.rs @@ -416,7 +416,7 @@ impl<'conn> SynapseReader<'conn> { SELECT user_id, device_id, display_name, last_seen, ip, user_agent FROM devices - WHERE NOT hidden + WHERE NOT hidden AND device_id != 'guest_device' ", ) .fetch(&mut *self.txn)