mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 16:14:49 -04:00
Add type hints for account validity handler (#8620)
This also fixes a bug by fixing handling of an account which doesn't expire.
This commit is contained in:
parent
66e6801c3e
commit
10f45d85bb
6 changed files with 31 additions and 12 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue