Open JoshuaMontgomery opened 7 years ago
Agreed, this would be extremely helpful as we have had a few people request private group import from Slack into Rocket.Chat and the limiting factor of them using this tool is the user's username is used and not their user id.
@graywolf336 I wrote an npm module called slack-message-archiver and ran into the same issues. It's a bit hacky but what I did was to use the Slack API to get a list of users (usernames + user ids) and then did some regexes on the text of the output of slack-history-export. See code here. Hope that helps.
Hi @tomsherman, you came to a similar solution as me, though more self-contained and less hacky. I ended up using two different tools, and the users.json file you can request from the slack API as well. It works well, except for sub-mentions, which are still not converted.
It would be great if the output json files could store the
user
field in the json as auser.id
rather thanuser.name
, where the matching is already in theusers.json
file. This would make it compatible with all of the applications designed to display official slack export files.Current message structure:
Proposed optional message structure:
In particular, this would allow your tool to be used in conjunction with the
slack-export-viewer
tool and preserve things like avatar pictures.By the way, thanks! This is a great tool.