diff options
author | Erik Johnston <erik@matrix.org> | 2020-11-17 10:51:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-17 10:51:25 +0000 |
commit | f737368a26bb9eea401fcc3a5bdd7e0b59e91f09 (patch) | |
tree | ee8e6f8e971c5d9f3dd136f0c036d77245bb100d /synapse/module_api | |
parent | Merge pull request #8757 from matrix-org/rav/pass_site_to_make_request (diff) | |
download | synapse-f737368a26bb9eea401fcc3a5bdd7e0b59e91f09.tar.xz |
Add admin API for logging in as a user (#8617)
Diffstat (limited to 'synapse/module_api')
-rw-r--r-- | synapse/module_api/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py index 0142542852..72ab5750cc 100644 --- a/synapse/module_api/__init__.py +++ b/synapse/module_api/__init__.py @@ -49,6 +49,7 @@ class ModuleApi: self._store = hs.get_datastore() self._auth = hs.get_auth() self._auth_handler = auth_handler + self._server_name = hs.hostname # We expose these as properties below in order to attach a helpful docstring. self._http_client = hs.get_simple_http_client() # type: SimpleHttpClient @@ -336,7 +337,9 @@ class ModuleApi: SynapseError if the event was not allowed. """ # Create a requester object - requester = create_requester(event_dict["sender"]) + requester = create_requester( + event_dict["sender"], authenticated_entity=self._server_name + ) # Create and send the event ( |