diff --git a/synapse/storage/databases/main/metrics.py b/synapse/storage/databases/main/metrics.py index 595e22982e90..633488267626 100644 --- a/synapse/storage/databases/main/metrics.py +++ b/synapse/storage/databases/main/metrics.py @@ -411,7 +411,10 @@ def _generate_user_daily_visits(txn: LoggingTransaction) -> None: ON u.user_id = udv.user_id AND u.device_id=udv.device_id INNER JOIN users ON users.name=u.user_id WHERE ? <= last_seen AND last_seen < ? - AND udv.timestamp IS NULL AND users.is_guest=0 + AND udv.timestamp IS NULL + AND u.user_agent !='sync-v3-proxy-' + AND u.user_agent !='matrix-rust-sdk' + AND users.is_guest=0 AND users.appservice_id IS NULL GROUP BY u.user_id, u.device_id """