felixrieseberg / slack-archive

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

`downloadFilesForChannel` not downloading files for channel #12

Closed cheapsteak closed 2 years ago

cheapsteak commented 2 years ago

For one of my channels that has messages and files, no files were being downloaded
Upon inspection, the results of getMessages is always an empty array

Looking at how downloadMessages runs, it's only after paginating through the pagination loop https://github.com/felixrieseberg/slack-archive/blob/a0c7ae81e48fdb9ae34bd3d33944f5252ad9e4de/src/download-messages.ts#L125-L142 that result.messages has a value

cheapsteak commented 2 years ago

ah, getMessages fetches messages from the downloaded JSON file, and when downloadFilesForChannel runs, the file doesn't exist yet