Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/syn2mas/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
2 changes: 1 addition & 1 deletion crates/syn2mas/src/synapse_reader/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading