summary refs log tree commit diff
path: root/synapse/module_api/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@matrix.org>2023-09-14 12:46:30 +0100
committerGitHub <noreply@github.com>2023-09-14 12:46:30 +0100
commit954921736b88de25c775c519a206449e46b3bf07 (patch)
treed4e428b26c39659d9da44996d9d3db3bcf6f2ddd /synapse/module_api/__init__.py
parentRemove a reference cycle in background process (#16314) (diff)
downloadsynapse-954921736b88de25c775c519a206449e46b3bf07.tar.xz
Refactor `get_user_by_id` (#16316)
Diffstat (limited to 'synapse/module_api/__init__.py')
-rw-r--r--synapse/module_api/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/module_api/__init__.py b/synapse/module_api/__init__.py

index d6efe10a28..7ec202be23 100644 --- a/synapse/module_api/__init__.py +++ b/synapse/module_api/__init__.py
@@ -572,7 +572,7 @@ class ModuleApi: Returns: UserInfo object if a user was found, otherwise None """ - return await self._store.get_userinfo_by_id(user_id) + return await self._store.get_user_by_id(user_id) async def get_user_by_req( self, @@ -1878,7 +1878,7 @@ class AccountDataManager: raise TypeError(f"new_data must be a dict; got {type(new_data).__name__}") # Ensure the user exists, so we don't just write to users that aren't there. - if await self._store.get_userinfo_by_id(user_id) is None: + if await self._store.get_user_by_id(user_id) is None: raise ValueError(f"User {user_id} does not exist on this server.") await self._handler.add_account_data_for_user(user_id, data_type, new_data)