diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2020-10-26 14:17:31 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-26 14:17:31 -0400 |
commit | 10f45d85bb355c66110b9221b0aa09010d2d03ad (patch) | |
tree | bc315cfe33e2d9d53c221ae17d5dbe945f8d7579 /synapse/handlers/profile.py | |
parent | Split admin API for reported events into a detail and a list view (#8539) (diff) | |
download | synapse-10f45d85bb355c66110b9221b0aa09010d2d03ad.tar.xz |
Add type hints for account validity handler (#8620)
This also fixes a bug by fixing handling of an account which doesn't expire.
Diffstat (limited to 'synapse/handlers/profile.py')
-rw-r--r-- | synapse/handlers/profile.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/handlers/profile.py b/synapse/handlers/profile.py index 3875e53c08..14348faaf3 100644 --- a/synapse/handlers/profile.py +++ b/synapse/handlers/profile.py @@ -131,7 +131,7 @@ class ProfileHandler(BaseHandler): profile = await self.store.get_from_remote_profile_cache(user_id) return profile or {} - async def get_displayname(self, target_user: UserID) -> str: + async def get_displayname(self, target_user: UserID) -> Optional[str]: if self.hs.is_mine(target_user): try: displayname = await self.store.get_profile_displayname( @@ -218,7 +218,7 @@ class ProfileHandler(BaseHandler): await self._update_join_states(requester, target_user) - async def get_avatar_url(self, target_user: UserID) -> str: + async def get_avatar_url(self, target_user: UserID) -> Optional[str]: if self.hs.is_mine(target_user): try: avatar_url = await self.store.get_profile_avatar_url( |