Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
d4daff9b
Unverified
Commit
d4daff9b
authored
4 years ago
by
Brendan Abolivier
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix /notifications and pushers misbehaving because of unread counts (#8280)
parent
6d01eb0c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/8280.bugfix
+1
-0
1 addition, 0 deletions
changelog.d/8280.bugfix
synapse/storage/databases/main/event_push_actions.py
+3
-2
3 additions, 2 deletions
synapse/storage/databases/main/event_push_actions.py
with
4 additions
and
2 deletions
changelog.d/8280.bugfix
0 → 100644
+
1
−
0
View file @
d4daff9b
Fix a bug introduced in v1.20.0rc1 causing some features related to notifications to misbehave following the implementation of unread counts.
This diff is collapsed.
Click to expand it.
synapse/storage/databases/main/event_push_actions.py
+
3
−
2
View file @
d4daff9b
...
...
@@ -196,7 +196,7 @@ class EventPushActionsWorkerStore(SQLBaseStore):
def
f
(
txn
):
sql
=
(
"
SELECT DISTINCT(user_id) FROM event_push_actions WHERE
"
"
stream_ordering >= ? AND stream_ordering <= ?
"
"
stream_ordering >= ? AND stream_ordering <= ?
AND notif = 1
"
)
txn
.
execute
(
sql
,
(
min_stream_ordering
,
max_stream_ordering
))
return
[
r
[
0
]
for
r
in
txn
]
...
...
@@ -644,7 +644,7 @@ class EventPushActionsWorkerStore(SQLBaseStore):
"
SELECT e.received_ts
"
"
FROM event_push_actions AS ep
"
"
JOIN events e ON ep.room_id = e.room_id AND ep.event_id = e.event_id
"
"
WHERE ep.stream_ordering > ?
"
"
WHERE ep.stream_ordering > ?
AND notif = 1
"
"
ORDER BY ep.stream_ordering ASC
"
"
LIMIT 1
"
)
...
...
@@ -708,6 +708,7 @@ class EventPushActionsStore(EventPushActionsWorkerStore):
"
FROM event_push_actions epa, events e
"
"
WHERE epa.event_id = e.event_id
"
"
AND epa.user_id = ? %s
"
"
AND epa.notif = 1
"
"
ORDER BY epa.stream_ordering DESC
"
"
LIMIT ?
"
%
(
before_clause
,)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment