This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Re-implement unread counts #7736
Merged
Merged
Changes from all commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
80d03b1
Store unread messages in the database
babolivier 9db0bac
Count the number of unread messages on sync requests
babolivier e33b891
Handle redactions
babolivier 0ee1963
Only insert rows for local users
babolivier 9cb9378
Handle lack of read receipt in a room
babolivier 9e723dd
Don't mark an event as unread for its own sender
babolivier 5399a7b
Run linter
babolivier 580b499
Fetch joined users from current_state_events instead of room_memberships
babolivier ff8b39d
Send unread count to the push gateway
babolivier eafdf9f
Add a redaction helper for tests
babolivier 994f267
Add test case for unread counts
babolivier 00fd951
Run linter on tests
babolivier a008f6f
Implement the latest changes in the MSC
babolivier fe5352f
Merge branch 'develop' into babolivier/unread_counts
babolivier d980c86
Incorporate most review comments
babolivier 3d3e048
Merge branch 'babolivier/unread_counts' of github.com:matrix-org/syna…
babolivier 572753b
Merge branch 'develop' into babolivier/unread_counts
babolivier bf1b1ec
Lint
babolivier e07fef1
Lint
babolivier 8b9d073
Fix column type
babolivier 287c263
Fix default value
babolivier b5972a9
Update port_db's list of bool columns
babolivier e9e2d88
Add a cache to get_unread_message_count_for_user
babolivier bc44ad4
Fix function call and cache invalidation
babolivier 9b9f6e2
Lint
babolivier 881fed3
Invalidate the cache in the main thread
babolivier 52ddc4d
Fix push badge computation
babolivier ea01eff
Lint
babolivier aa0a56b
Use invalidate_cache_and_stream to invalidate the cache across workers
babolivier 420573a
Process the cache stream first for incoming replication
babolivier 79464f8
Fix receipts replication test
babolivier 48a2a00
Merge branch 'develop' into babolivier/unread_counts
babolivier 0710078
Revert "Fix receipts replication test"
babolivier ea10fc1
Revert "Process the cache stream first for incoming replication"
babolivier 0ea0792
Revert "Use invalidate_cache_and_stream to invalidate the cache acros…
babolivier 096aca9
Fix read receipt cache invalidation (hopefully)
babolivier 28f3e2b
Lint
babolivier 2302b6c
Merge branch 'develop' of github.com:matrix-org/synapse into babolivi…
babolivier d40557b
Incorporate review
babolivier 5d3aaf7
Fix unread messages test
babolivier 6f50007
Lint
babolivier b265bef
Merge branch 'develop' of github.com:matrix-org/synapse into babolivi…
babolivier debedb3
Remove default value for count_as_unread
babolivier 57ded3e
Merge branch 'develop' of github.com:matrix-org/synapse into babolivi…
babolivier 82d9f39
Match the latest changes on the MSC
babolivier 17e922a
Fix test
babolivier d7fdc35
Typo
babolivier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add unread messages count to sync responses. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
synapse/storage/data_stores/main/schema/delta/58/12unread_messages.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/* Copyright 2020 The Matrix.org Foundation C.I.C | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
-- Store a boolean value in the events table for whether the event should be counted in | ||
-- the unread_count property of sync responses. | ||
ALTER TABLE events ADD COLUMN count_as_unread BOOLEAN; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.