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
c5776780
Unverified
Commit
c5776780
authored
3 years ago
by
Jonathan de Jong
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove mutual_rooms `update_user_directory` check, and add extra documentation (#12038)
Resolves #10339
parent
692b8283
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
changelog.d/12038.misc
+1
-0
1 addition, 0 deletions
changelog.d/12038.misc
docs/workers.md
+10
-1
10 additions, 1 deletion
docs/workers.md
synapse/rest/client/mutual_rooms.py
+6
-4
6 additions, 4 deletions
synapse/rest/client/mutual_rooms.py
with
17 additions
and
5 deletions
changelog.d/12038.misc
0 → 100644
+
1
−
0
View file @
c5776780
Remove check on `update_user_directory` for shared rooms handler (MSC2666), and update/expand documentation.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docs/workers.md
+
10
−
1
View file @
c5776780
...
...
@@ -528,10 +528,19 @@ the following regular expressions:
^/_matrix/client/(r0|v3|unstable)/user_directory/search$
When using this worker you must also set
`update_user_directory:
F
alse`
in the
When using this worker you must also set
`update_user_directory:
f
alse`
in the
shared configuration file to stop the main synapse running background
jobs related to updating the user directory.
Above endpoint is not
*required*
to be routed to this worker. By default,
`update_user_directory`
is set to
`true`
, which means the main process
will handle updates. All workers configured with
`client`
can handle the above
endpoint as long as either this worker or the main process are configured to
handle it, and are online.
If
`update_user_directory`
is set to
`false`
, and this worker is not running,
the above endpoint may give outdated results.
### `synapse.app.frontend_proxy`
Proxies some frequently-requested client endpoints to add caching and remove
...
...
This diff is collapsed.
Click to expand it.
synapse/rest/client/mutual_rooms.py
+
6
−
4
View file @
c5776780
...
...
@@ -42,17 +42,19 @@ class UserMutualRoomsServlet(RestServlet):
super
().
__init__
()
self
.
auth
=
hs
.
get_auth
()
self
.
store
=
hs
.
get_datastores
().
main
self
.
user_directory_active
=
hs
.
config
.
server
.
update_user_directory
self
.
user_directory_search_enabled
=
(
hs
.
config
.
userdirectory
.
user_directory_search_enabled
)
async
def
on_GET
(
self
,
request
:
SynapseRequest
,
user_id
:
str
)
->
Tuple
[
int
,
JsonDict
]:
if
not
self
.
user_directory_
active
:
if
not
self
.
user_directory_
search_enabled
:
raise
SynapseError
(
code
=
400
,
msg
=
"
The u
ser directory is disabled
on this server
. Cannot determine shared rooms.
"
,
errcode
=
Codes
.
FORBIDDE
N
,
msg
=
"
U
ser directory
searching
is disabled. Cannot determine shared rooms.
"
,
errcode
=
Codes
.
UNKNOW
N
,
)
UserID
.
from_string
(
user_id
)
...
...
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