From 21bf597583ea3e71dcdbbee54069055f9f397ef1 Mon Sep 17 00:00:00 2001 From: Sami Olmari Date: Tue, 17 May 2022 23:47:18 +0300 Subject: [PATCH 1/6] Add user directory search endpoint missing from the generic worker documentation (#12768) Signed-off-by: Sami Olmari --- docs/workers.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/workers.md b/docs/workers.md index 553792d2384c..db5112c59eb4 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -251,6 +251,8 @@ information. # Presence requests ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/ + # User directory queries + ^/_matrix/client/(r0|v3|unstable)/user_directory/search$ Additionally, the following REST endpoints can be handled for GET requests: @@ -445,6 +447,10 @@ Specify its name in the shared configuration as follows: update_user_directory_from_worker: worker_name ``` +It can handle REST endpoint matching the following regular expression: + + ^/_matrix/client/(r0|v3|unstable)/user_directory/search$ + This work cannot be load-balanced; please ensure the main process is restarted after setting this option in the shared configuration! From 34fbda634fa1af6ef86519b15b4d44264bc498c0 Mon Sep 17 00:00:00 2001 From: Sami Olmari Date: Tue, 17 May 2022 23:55:22 +0300 Subject: [PATCH 2/6] Add changelog.d file Signed-off-by: Sami Olmari --- changelog.d/12773.doc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/12773.doc diff --git a/changelog.d/12773.doc b/changelog.d/12773.doc new file mode 100644 index 000000000000..4afa22b3da74 --- /dev/null +++ b/changelog.d/12773.doc @@ -0,0 +1 @@ +Add missing user directory endpoint from the generic worker documentation. \ No newline at end of file From 40adc3f693db01def67feec5ecd0f2f9f44e5abc Mon Sep 17 00:00:00 2001 From: Sami Olmari Date: Wed, 18 May 2022 00:18:05 +0300 Subject: [PATCH 3/6] Add contributed by. Signed-off-by: Sami Olmari --- changelog.d/12773.doc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog.d/12773.doc b/changelog.d/12773.doc index 4afa22b3da74..6de371653427 100644 --- a/changelog.d/12773.doc +++ b/changelog.d/12773.doc @@ -1 +1 @@ -Add missing user directory endpoint from the generic worker documentation. \ No newline at end of file +Add missing user directory endpoint from the generic worker documentation. Contributed by @olmari. \ No newline at end of file From 80ff712882f3c98cea7a04b4b301c1acfc2b9cb2 Mon Sep 17 00:00:00 2001 From: Sami Olmari Date: Wed, 18 May 2022 21:07:12 +0300 Subject: [PATCH 4/6] Update docs/workers.md Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> --- docs/workers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/workers.md b/docs/workers.md index db5112c59eb4..fbf73bd638cd 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -251,7 +251,7 @@ information. # Presence requests ^/_matrix/client/(api/v1|r0|v3|unstable)/presence/ - # User directory queries + # User directory search requests ^/_matrix/client/(r0|v3|unstable)/user_directory/search$ Additionally, the following REST endpoints can be handled for GET requests: From fc5de60a13d77281941021e85dd3a4b1c77ebda7 Mon Sep 17 00:00:00 2001 From: Sami Olmari Date: Wed, 18 May 2022 21:18:46 +0300 Subject: [PATCH 5/6] Update docs/workers.md Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> --- docs/workers.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/docs/workers.md b/docs/workers.md index fbf73bd638cd..1157cf99db27 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -447,10 +447,6 @@ Specify its name in the shared configuration as follows: update_user_directory_from_worker: worker_name ``` -It can handle REST endpoint matching the following regular expression: - - ^/_matrix/client/(r0|v3|unstable)/user_directory/search$ - This work cannot be load-balanced; please ensure the main process is restarted after setting this option in the shared configuration! From cddc50aa445cd81e2bcf506b822e745457daf1a9 Mon Sep 17 00:00:00 2001 From: Sami Olmari Date: Wed, 18 May 2022 22:51:30 +0300 Subject: [PATCH 6/6] Update docs/workers.md Co-authored-by: Sean Quah <8349537+squahtx@users.noreply.github.com> Signed-off-by: Sami Olmari --- docs/workers.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/workers.md b/docs/workers.md index 1157cf99db27..779069b8177f 100644 --- a/docs/workers.md +++ b/docs/workers.md @@ -450,6 +450,14 @@ update_user_directory_from_worker: worker_name This work cannot be load-balanced; please ensure the main process is restarted after setting this option in the shared configuration! +User directory updates allow REST endpoints matching the following regular +expressions to work: + + ^/_matrix/client/(r0|v3|unstable)/user_directory/search$ + +The above endpoints can be routed to any worker, though you may choose to route +it to the chosen user directory worker. + This style of configuration supersedes the legacy `synapse.app.user_dir` worker application type.