diff options
author | Shay <hillerys@element.io> | 2023-06-02 17:24:13 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-02 17:24:13 -0700 |
commit | d0c4257f14addbf0c9072c2e34ae1c8294716ed5 (patch) | |
tree | ae70970e9e40512739c4df0927d25d0649602743 /synapse/module_api | |
parent | Add a catch-all * to the supported relation types when redacting (#15705) (diff) | |
download | synapse-d0c4257f14addbf0c9072c2e34ae1c8294716ed5.tar.xz |
`N + 3`: Read from column `full_user_id` rather than `user_id` of tables `profiles` and `user_filters` (#15649)
Diffstat (limited to 'synapse/module_api')
-rw-r--r-- | synapse/module_api/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py index a8d6224a45..84b2aef620 100644 --- a/synapse/module_api/__init__.py +++ b/synapse/module_api/__init__.py @@ -655,7 +655,9 @@ class ModuleApi: Returns: The profile information (i.e. display name and avatar URL). """ - return await self._store.get_profileinfo(localpart) + server_name = self._hs.hostname + user_id = UserID.from_string(f"@{localpart}:{server_name}") + return await self._store.get_profileinfo(user_id) async def get_threepids_for_user(self, user_id: str) -> List[Dict[str, str]]: """Look up the threepids (email addresses and phone numbers) associated with the |