This commit is contained in:
Robert 2024-03-12 01:35:05 +07:00
parent 7b168021ef
commit ed5f1c75b9
No known key found for this signature in database
GPG Key ID: F631C7FD957D5F22

View File

@ -18,10 +18,10 @@ class FileUploaderService:
self.uploaded_file_repository = uploaded_file_repository
async def upload_from_chain(self, chain: Chain):
files_to_upload = list()
file_urls_to_upload = list()
for action in filter(lambda a: a.action_type == "comment", chain.actions):
file_urls_to_upload = [*files_to_upload, *action.file_urls]
file_urls_to_upload = [*file_urls_to_upload, *action.file_urls]
for file_url in file_urls_to_upload:
await self.upload_file_by_url(file_url)