Skip to content
This repository was archived by the owner on Mar 26, 2024. It is now read-only.

Commit b807031

Browse files
committed
Restore e2e key counting
1 parent 5f8c5d4 commit b807031

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

synapse/handlers/e2e_room_keys.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,8 @@ async def upload_room_keys(
273273
user_id, version, None, version_etag
274274
)
275275

276-
# Beeper: Clients don't care, save some time
277-
# count = await self.store.count_e2e_room_keys(user_id, version)
278-
return {"etag": str(version_etag), "count": 0 }
276+
count = await self.store.count_e2e_room_keys(user_id, version)
277+
return {"etag": str(version_etag), "count": count}
279278

280279
@staticmethod
281280
def _should_replace_room_key(
@@ -369,9 +368,7 @@ async def get_version_info(
369368
else:
370369
raise
371370

372-
# # Beeper: Clients don't care, save some time
373-
# res["count"] = await self.store.count_e2e_room_keys(user_id, res["version"])
374-
res["count"] = 0
371+
res["count"] = await self.store.count_e2e_room_keys(user_id, res["version"])
375372
res["etag"] = str(res["etag"])
376373
return res
377374

0 commit comments

Comments
 (0)