felixrieseberg / slack-archive

Generate static HTML archives of Slack workspaces
243 stars 33 forks source link

Fix file downloads #13

Closed cheapsteak closed 2 years ago

cheapsteak commented 2 years ago

Fixes https://github.com/felixrieseberg/slack-archive/issues/12

downloadFilesForChannel relies on data downloaded by downloadMessages being persisted to disk, but was running before the file were written and was getting no files. This PR moves the downloadFilesForChannel call to after the data files are written

An alternative would have been to import messagesCache in download-messages, set the cache after paginating through conversation history, and tell downloadFilesForChannel's getMessages to use the cache, but that feels a bit messier

felixrieseberg commented 2 years ago

Thank you for all your PRs!