diff options
author | devonh <devon.dmytro@gmail.com> | 2024-05-21 20:09:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 20:09:17 +0000 |
commit | 6a9a641fb86b04587840bcb6b76af9a0acef9b54 (patch) | |
tree | a8c0bace62f61de7b605c23635d85d111abf11d9 /synapse/handlers/sso.py | |
parent | Improve perf of sync device lists (#17216) (diff) | |
download | synapse-6a9a641fb86b04587840bcb6b76af9a0acef9b54.tar.xz |
Bring auto-accept invite logic into Synapse (#17147)
This PR ports the logic from the [synapse_auto_accept_invite](https://github.com/matrix-org/synapse-auto-accept-invite) module into synapse. I went with the naive approach of injecting the "module" next to where third party modules are currently loaded. If there is a better/preferred way to handle this, I'm all ears. It wasn't obvious to me if there was a better location to add this logic that would cleanly apply to all incoming invite events. Relies on https://github.com/element-hq/synapse/pull/17166 to fix linter errors.
Diffstat (limited to '')
-rw-r--r-- | synapse/handlers/sso.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/handlers/sso.py b/synapse/handlers/sso.py index f275d4f35a..ee74289b6c 100644 --- a/synapse/handlers/sso.py +++ b/synapse/handlers/sso.py @@ -817,7 +817,7 @@ class SsoHandler: server_name = profile["avatar_url"].split("/")[-2] media_id = profile["avatar_url"].split("/")[-1] if self._is_mine_server_name(server_name): - media = await self._media_repo.store.get_local_media(media_id) + media = await self._media_repo.store.get_local_media(media_id) # type: ignore[has-type] if media is not None and upload_name == media.upload_name: logger.info("skipping saving the user avatar") return True |