element-hq / element-hq/synapse

Add a method for Synapse modules to make federation requests over HTTP

Open
#15,149 0 comments 0 reactions 0 assignees View on GitHub
Z-Time-Tracked
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#15149](https://github.com/matrix-org/synapse/pull/15149).

---

Provides a fairly basic interface for Synapse modules to complete HTTP federation requests in the form of a new `send_federation_http_request` module API method. The motivation behind this change is to allow a Synapse module to query the [`POST /_matrix/federation/v1/publicRooms`](https://spec.matrix.org/v1.6/server-server-api/#post_matrixfederationv1publicrooms) federation endpoint of one or more remote homeservers.

An abstraction layer (error types, etc.) over Synapse's `MatrixFederationHttpClient` was used in order to prevent having to stabilise any internal federation handling code, and to provide a simpler interface for modules to use.

TODO: unit tests

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the proposed send_federation_http_request module API and the MatrixFederationHttpClient abstraction described in the issue. Add the missing unit tests, including a request to the publicRooms federation endpoint and the documented error-handling behavior; done means the module-facing interface and its error types are covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.