Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
ab3165ef
Unverified
Commit
ab3165ef
authored
2 years ago
by
Patrick Cloke
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove experimental configuration flag for MSC3666. (#12436)
parent
4586119f
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changelog.d/12436.feature
+2
-0
2 additions, 0 deletions
changelog.d/12436.feature
synapse/config/experimental.py
+0
-2
0 additions, 2 deletions
synapse/config/experimental.py
synapse/handlers/search.py
+13
-17
13 additions, 17 deletions
synapse/handlers/search.py
with
15 additions
and
19 deletions
changelog.d/12436.feature
0 → 100644
+
2
−
0
View file @
ab3165ef
Include
bundled
aggregations
in
search
results
([MSC3666](https
:
//github.com/matrix-org/matrix-spec-proposals/pull/3666)).
This diff is collapsed.
Click to expand it.
synapse/config/experimental.py
+
0
−
2
View file @
ab3165ef
...
@@ -28,8 +28,6 @@ class ExperimentalConfig(Config):
...
@@ -28,8 +28,6 @@ class ExperimentalConfig(Config):
# MSC3440 (thread relation)
# MSC3440 (thread relation)
self
.
msc3440_enabled
:
bool
=
experimental
.
get
(
"
msc3440_enabled
"
,
False
)
self
.
msc3440_enabled
:
bool
=
experimental
.
get
(
"
msc3440_enabled
"
,
False
)
# MSC3666: including bundled relations in /search.
self
.
msc3666_enabled
:
bool
=
experimental
.
get
(
"
msc3666_enabled
"
,
False
)
# MSC3026 (busy presence state)
# MSC3026 (busy presence state)
self
.
msc3026_enabled
:
bool
=
experimental
.
get
(
"
msc3026_enabled
"
,
False
)
self
.
msc3026_enabled
:
bool
=
experimental
.
get
(
"
msc3026_enabled
"
,
False
)
...
...
This diff is collapsed.
Click to expand it.
synapse/handlers/search.py
+
13
−
17
View file @
ab3165ef
...
@@ -59,8 +59,6 @@ class SearchHandler:
...
@@ -59,8 +59,6 @@ class SearchHandler:
self
.
state_store
=
self
.
storage
.
state
self
.
state_store
=
self
.
storage
.
state
self
.
auth
=
hs
.
get_auth
()
self
.
auth
=
hs
.
get_auth
()
self
.
_msc3666_enabled
=
hs
.
config
.
experimental
.
msc3666_enabled
async
def
get_old_rooms_from_upgraded_room
(
self
,
room_id
:
str
)
->
Iterable
[
str
]:
async
def
get_old_rooms_from_upgraded_room
(
self
,
room_id
:
str
)
->
Iterable
[
str
]:
"""
Retrieves room IDs of old rooms in the history of an upgraded room.
"""
Retrieves room IDs of old rooms in the history of an upgraded room.
...
@@ -353,22 +351,20 @@ class SearchHandler:
...
@@ -353,22 +351,20 @@ class SearchHandler:
state
=
await
self
.
state_handler
.
get_current_state
(
room_id
)
state
=
await
self
.
state_handler
.
get_current_state
(
room_id
)
state_results
[
room_id
]
=
list
(
state
.
values
())
state_results
[
room_id
]
=
list
(
state
.
values
())
aggregations
=
None
aggregations
=
await
self
.
_relations_handler
.
get_bundled_aggregations
(
if
self
.
_msc3666_enabled
:
# Generate an iterable of EventBase for all the events that will be
aggregations
=
await
self
.
_relations_handler
.
get_bundled_aggregations
(
# returned, including contextual events.
# Generate an iterable of EventBase for all the events that will be
itertools
.
chain
(
# returned, including contextual events.
# The events_before and events_after for each context.
itertools
.
chain
(
itertools
.
chain
.
from_iterable
(
# The events_before and events_after for each context.
itertools
.
chain
(
context
[
"
events_before
"
],
context
[
"
events_after
"
])
# type: ignore[arg-type]
itertools
.
chain
.
from_iterable
(
for
context
in
contexts
.
values
()
itertools
.
chain
(
context
[
"
events_before
"
],
context
[
"
events_after
"
])
# type: ignore[arg-type]
for
context
in
contexts
.
values
()
),
# The returned events.
search_result
.
allowed_events
,
),
),
user
.
to_string
(),
# The returned events.
)
search_result
.
allowed_events
,
),
user
.
to_string
(),
)
# We're now about to serialize the events. We should not make any
# We're now about to serialize the events. We should not make any
# blocking calls after this. Otherwise, the 'age' will be wrong.
# blocking calls after this. Otherwise, the 'age' will be wrong.
...
...
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