summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorWill Hunt <will@half-shot.uk>2020-11-18 18:54:09 +0000
committerGitHub <noreply@github.com>2020-11-18 18:54:09 +0000
commit51338491c9bedcdfb5f9babad2a34cbfea6b57d2 (patch)
treeb3949e31bec8469cbdf31e3083f87af72c04e3b8 /synapse/handlers
parentFix tests on develop (#8777) (diff)
downloadsynapse-51338491c9bedcdfb5f9babad2a34cbfea6b57d2.tar.xz
Improve appservice handler to send only the most recent read receipts when no stream_id is stored. (#8744)
* Make this line debug (it's noisy)

* Don't include from_key for presence if we are at 0

* Limit read receipts for all rooms to 100

* changelog.d/8744.bugfix

* Allow from_key to be None

* Update 8744.bugfix

* The from_key is superflous

* Update comment
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/appservice.py2
-rw-r--r--synapse/handlers/receipts.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index 9fc8444228..5c6458eb52 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -226,7 +226,7 @@ class ApplicationServicesHandler:
         new_token: Optional[int],
         users: Collection[Union[str, UserID]],
     ):
-        logger.info("Checking interested services for %s" % (stream_key))
+        logger.debug("Checking interested services for %s" % (stream_key))
         with Measure(self.clock, "notify_interested_services_ephemeral"):
             for service in services:
                 # Only handle typing if we have the latest token
diff --git a/synapse/handlers/receipts.py b/synapse/handlers/receipts.py
index c242c409cf..153cbae7b9 100644
--- a/synapse/handlers/receipts.py
+++ b/synapse/handlers/receipts.py
@@ -158,7 +158,8 @@ class ReceiptEventSource:
         if from_key == to_key:
             return [], to_key
 
-        # We first need to fetch all new receipts
+        # Fetch all read receipts for all rooms, up to a limit of 100. This is ordered
+        # by most recent.
         rooms_to_events = await self.store.get_linearized_receipts_for_all_rooms(
             from_key=from_key, to_key=to_key
         )