1 files changed, 16 insertions, 0 deletions
diff --git a/synapse/storage/databases/main/profile.py b/synapse/storage/databases/main/profile.py
index b109f8c07f..c4022d2427 100644
--- a/synapse/storage/databases/main/profile.py
+++ b/synapse/storage/databases/main/profile.py
@@ -85,6 +85,14 @@ class ProfileWorkerStore(SQLBaseStore):
async def set_profile_displayname(
self, user_id: UserID, new_displayname: Optional[str]
) -> None:
+ """
+ Set the display name of a user.
+
+ Args:
+ user_id: The user's ID.
+ new_displayname: The new display name. If this is None, the user's display
+ name is removed.
+ """
user_localpart = user_id.localpart
await self.db_pool.simple_upsert(
table="profiles",
@@ -99,6 +107,14 @@ class ProfileWorkerStore(SQLBaseStore):
async def set_profile_avatar_url(
self, user_id: UserID, new_avatar_url: Optional[str]
) -> None:
+ """
+ Set the avatar of a user.
+
+ Args:
+ user_id: The user's ID.
+ new_avatar_url: The new avatar URL. If this is None, the user's avatar is
+ removed.
+ """
user_localpart = user_id.localpart
await self.db_pool.simple_upsert(
table="profiles",
|