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

Use threaded receipts when fetching events for push #13878

Merged
merged 38 commits into from
Oct 4, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
9cb167c
Update filtering to include the thread notifications flag.
clokep Sep 8, 2022
8ac2f32
Ensure that the thread_id column is non-null and then require it to b…
clokep Sep 9, 2022
111fe57
Add infrastructure to pass notifications per thread.
clokep Sep 8, 2022
62aa85b
Calculate thread specific notification counts.
clokep Sep 8, 2022
cb679e2
Clarify comment.
clokep Sep 16, 2022
ba00c5f
Simplify handling of summaries with neither notifications or unread c…
clokep Sep 16, 2022
eb56567
Delete old push summaries.
clokep Sep 16, 2022
e6f97ec
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 16, 2022
4f4711a
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 19, 2022
8b63c5b
Fix postgres compatibility.
clokep Sep 19, 2022
c3783df
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 20, 2022
c4f2d50
Create a constant for "main".
clokep Sep 20, 2022
6927e59
Reduce duplicated code.
clokep Sep 20, 2022
1d05975
Lint
clokep Sep 20, 2022
28b5a1f
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 22, 2022
55d15a3
Threads must already be summarized between the stream orderings that …
clokep Sep 22, 2022
56c21e4
Don't delete empty push summaries.
clokep Sep 22, 2022
241b40c
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 23, 2022
a04258f
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 26, 2022
ddbb644
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 27, 2022
f20620f
Update constraints and indexes now that thread ID is used.
clokep Sep 12, 2022
52b0a3d
Mark threads as read separately.
clokep Sep 22, 2022
fb50244
Use MAIN_TIMELINE constant in more places.
clokep Sep 28, 2022
79452e9
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 28, 2022
b0d9008
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 28, 2022
d6d7788
Combine logic for processing receipts.
clokep Sep 28, 2022
162bd8d
Expand comment and rename variables for clarity.
clokep Sep 28, 2022
e7b5421
Clarify comment.
clokep Sep 28, 2022
5f5e9ad
Improve docstrings.
clokep Sep 28, 2022
16a60b9
Rename function.
clokep Sep 28, 2022
f6a99c8
Lint
clokep Sep 28, 2022
f279a15
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Sep 29, 2022
ef37de2
Merge remote-tracking branch 'origin/clokep/threads-notif-2' into clo…
clokep Sep 29, 2022
6b2384d
Fix typo.
clokep Sep 29, 2022
041fe7f
Only attempt to find threaded receipts newer than the latest unthread…
clokep Sep 29, 2022
4f687b2
Handle threads when fetching events for push.
clokep Sep 22, 2022
f59421c
Merge remote-tracking branch 'origin/develop' into clokep/threads-not…
clokep Oct 4, 2022
0d675df
Remove files from bad merge.
clokep Oct 4, 2022
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
Prev Previous commit
Next Next commit
Rename function.
  • Loading branch information
clokep committed Sep 28, 2022
commit 16a60b96854dddf47a37ed06ed1ba643a755922e
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/event_push_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ def _get_unread_counts_by_receipt_txn(
user_id: str,
) -> RoomNotifCounts:
# Get the stream ordering of the user's latest receipt in the room.
result = self.get_last_receipt_for_user_txn(
result = self.get_last_unthreaded_receipt_for_user_txn(
txn,
user_id,
room_id,
Expand Down
4 changes: 2 additions & 2 deletions synapse/storage/databases/main/receipts.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ async def get_last_receipt_event_id_for_user(
"""
result = await self.db_pool.runInteraction(
"get_last_receipt_event_id_for_user",
self.get_last_receipt_for_user_txn,
self.get_last_unthreaded_receipt_for_user_txn,
user_id,
room_id,
receipt_types,
Expand All @@ -162,7 +162,7 @@ async def get_last_receipt_event_id_for_user(
event_id, _ = result
return event_id

def get_last_receipt_for_user_txn(
def get_last_unthreaded_receipt_for_user_txn(
self,
txn: LoggingTransaction,
user_id: str,
Expand Down