Compare commits

..

2 Commits

2 changed files with 29 additions and 31 deletions

View File

@ -1050,7 +1050,7 @@ class Portal(DBPortal, BasePortal):
source, intent, attachment, timestamp, message_text
))
def _handle_remote_multiphoto(
async def _handle_remote_multiphoto(
self,
source: u.User,
intent: IntentAPI,
@ -1059,9 +1059,8 @@ class Portal(DBPortal, BasePortal):
message_text: str | None,
) -> Awaitable[list[EventID]]:
# TODO Upload media concurrently, but post messages sequentially
return asyncio.gather(
*[
self._handle_remote_uniphoto(
return [
await self._handle_remote_uniphoto(
source, intent,
PhotoAttachment(
shout=attachment.shout,
@ -1082,7 +1081,6 @@ class Portal(DBPortal, BasePortal):
)
for i in range(len(attachment.imageUrls))
]
)
def _handle_remote_uniphoto(
self,

View File

@ -148,26 +148,26 @@ class Puppet(DBPuppet, BasePuppet):
# region User info updating
async def update_info_from_participant(
def update_info_from_participant(
self,
source: u.User,
info: UserInfoUnion,
update_avatar: bool = True,
) -> Puppet:
await self._update_info(
) -> Awaitable[Puppet]:
return self._update_info(
source,
info.nickname,
info.profileURL,
update_avatar
)
async def update_info_from_friend(
def update_info_from_friend(
self,
source: u.User,
info: FriendStruct,
update_avatar: bool = True,
) -> Puppet:
await self._update_info(
) -> Awaitable[Puppet]:
return self._update_info(
source,
info.nickName,
info.profileImageUrl,