Send multiphoto messages in order
This commit is contained in:
parent
d116ebefc7
commit
15415a5eec
@ -1050,7 +1050,7 @@ class Portal(DBPortal, BasePortal):
|
|||||||
source, intent, attachment, timestamp, message_text
|
source, intent, attachment, timestamp, message_text
|
||||||
))
|
))
|
||||||
|
|
||||||
def _handle_remote_multiphoto(
|
async def _handle_remote_multiphoto(
|
||||||
self,
|
self,
|
||||||
source: u.User,
|
source: u.User,
|
||||||
intent: IntentAPI,
|
intent: IntentAPI,
|
||||||
@ -1059,9 +1059,8 @@ class Portal(DBPortal, BasePortal):
|
|||||||
message_text: str | None,
|
message_text: str | None,
|
||||||
) -> Awaitable[list[EventID]]:
|
) -> Awaitable[list[EventID]]:
|
||||||
# TODO Upload media concurrently, but post messages sequentially
|
# TODO Upload media concurrently, but post messages sequentially
|
||||||
return asyncio.gather(
|
return [
|
||||||
*[
|
await self._handle_remote_uniphoto(
|
||||||
self._handle_remote_uniphoto(
|
|
||||||
source, intent,
|
source, intent,
|
||||||
PhotoAttachment(
|
PhotoAttachment(
|
||||||
shout=attachment.shout,
|
shout=attachment.shout,
|
||||||
@ -1082,7 +1081,6 @@ class Portal(DBPortal, BasePortal):
|
|||||||
)
|
)
|
||||||
for i in range(len(attachment.imageUrls))
|
for i in range(len(attachment.imageUrls))
|
||||||
]
|
]
|
||||||
)
|
|
||||||
|
|
||||||
def _handle_remote_uniphoto(
|
def _handle_remote_uniphoto(
|
||||||
self,
|
self,
|
||||||
|
Loading…
Reference in New Issue
Block a user