rusq / slackdump

Save or export your private and public Slack messages, threads, files, and users locally without admin privileges.
GNU General Public License v3.0
813 stars 60 forks source link

Slack Export users.json missing entries for external users #292

Open camisotro opened 3 weeks ago

camisotro commented 3 weeks ago

Describe the bug My Slack history includes some channels and conversations that belong to different Slack orgs, e.g. they invited us using Slack Connect to join one of their channels. When I do a dump in Slack Export format, these users are missing from users.json completely. As a result tools like SlackLogViewer will crash on it.

To Reproduce Steps to reproduce the behavior:

  1. Set up a scenario where you are on one Slack instance and another user has invited you via Slack Connect to join a channel located on their instance.
  2. Use slackdump to make an export of the channel in which you chatted with them
  3. Observe that the user ID attached to their messages does not appear at all in users.json

Expected behavior Even if slackdump is unable to find the user's name by API, it should ensure users.json contains an entry for every user ID that appears in exported chats. Otherwise parsing tools have difficulty with the result files.

rusq commented 4 days ago

Cool, thanks for the report. The reason external users are not there is because the "user.list" api does not return it. Most likely it requires polling some different api endpoint.

camisotro commented 4 days ago

Thanks. Yeah I figured something like that. Ideally it would create at least some kind of placeholder entry.

My company is migrating away from Slack later this year, and I was able to do a successful test dump except that it just won't open in the reader tools with a bunch of missing user IDs. So maybe a good idea would be for it to keep a running count of all the user IDs it sees, and then attempt to synthesize placeholder entries for them.

Those IDs still work when manually calling the URL of the chat.