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
d8762cc1
Unverified
Commit
d8762cc1
authored
4 years ago
by
Brendan Abolivier
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Only add rows to the push actions table if the event notifies or should be marked unread (#8274)
parent
ef2804d2
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/8274.feature
+1
-0
1 addition, 0 deletions
changelog.d/8274.feature
synapse/push/bulk_push_rule_evaluator.py
+6
-1
6 additions, 1 deletion
synapse/push/bulk_push_rule_evaluator.py
with
7 additions
and
1 deletion
changelog.d/8274.feature
0 → 100644
+
1
−
0
View file @
d8762cc1
Add unread messages count to sync responses, as specified in [MSC2654](https
:
//github.com/matrix-org/matrix-doc/pull/2654).
This diff is collapsed.
Click to expand it.
synapse/push/bulk_push_rule_evaluator.py
+
6
−
1
View file @
d8762cc1
...
@@ -219,7 +219,12 @@ class BulkPushRuleEvaluator:
...
@@ -219,7 +219,12 @@ class BulkPushRuleEvaluator:
if
event
.
type
==
EventTypes
.
Member
and
event
.
state_key
==
uid
:
if
event
.
type
==
EventTypes
.
Member
and
event
.
state_key
==
uid
:
display_name
=
event
.
content
.
get
(
"
displayname
"
,
None
)
display_name
=
event
.
content
.
get
(
"
displayname
"
,
None
)
actions_by_user
[
uid
]
=
[]
if
count_as_unread
:
# Add an element for the current user if the event needs to be marked as
# unread, so that add_push_actions_to_staging iterates over it.
# If the event shouldn't be marked as unread but should notify the
# current user, it'll be added to the dict later.
actions_by_user
[
uid
]
=
[]
for
rule
in
rules
:
for
rule
in
rules
:
if
"
enabled
"
in
rule
and
not
rule
[
"
enabled
"
]:
if
"
enabled
"
in
rule
and
not
rule
[
"
enabled
"
]:
...
...
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