summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2024-07-11 16:44:15 +0100
committerErik Johnston <erik@matrix.org>2024-07-11 16:44:15 +0100
commit33e0ff2f8ca8cdb61e62e5eee1b713c5bad6bbc4 (patch)
tree6469697fbad39d59ffb7e6fbc74c451b46d131fa
parentMerge branch 'erikj/ss_sort' into erikj/ss_hacks (diff)
downloadsynapse-33e0ff2f8ca8cdb61e62e5eee1b713c5bad6bbc4.tar.xz
Reduce log spam
-rw-r--r--synapse/handlers/sliding_sync.py20
1 files changed, 8 insertions, 12 deletions
diff --git a/synapse/handlers/sliding_sync.py b/synapse/handlers/sliding_sync.py
index 7ca88b86ee..90128fa7f5 100644
--- a/synapse/handlers/sliding_sync.py
+++ b/synapse/handlers/sliding_sync.py
@@ -24,12 +24,7 @@ from typing import TYPE_CHECKING, Any, Dict, Final, List, Optional, Set, Tuple
 import attr
 from immutabledict import immutabledict
 
-from synapse.api.constants import (
-    AccountDataTypes,
-    Direction,
-    EventTypes,
-    Membership,
-)
+from synapse.api.constants import AccountDataTypes, Direction, EventTypes, Membership
 from synapse.events import EventBase
 from synapse.events.utils import strip_event
 from synapse.handlers.relations import BundledAggregations
@@ -1571,12 +1566,13 @@ class SlidingSyncHandler:
                 up_to_stream_id=since_stream_id,
             )
 
-            logger.debug(
-                "Deleted %d to-device messages up to %d for %s",
-                deleted,
-                since_stream_id,
-                user_id,
-            )
+            if deleted:
+                logger.debug(
+                    "Deleted %d to-device messages up to %d for %s",
+                    deleted,
+                    since_stream_id,
+                    user_id,
+                )
 
         messages, stream_id = await self.store.get_messages_for_device(
             user_id=user_id,