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
1.59k stars 72 forks source link

Member lists missing (fixed in 2.4.0), implement in 3.0.0 #220

Open svenssonaxel opened 1 year ago

svenssonaxel commented 1 year ago

Describe the bug Member lists in groups.json and channel.json are null. The stated number of members in groups.json is claimed to be zero.

To Reproduce ./slackdump/slackdump -export workspacename-username.zip -export-type mattermost -download -cache-dir slackdump-cache-workspacename-username

Expected behavior Member lists are exported for channels, dms and groups.

Actual behaior

Desktop (please complete the following information):

>uname -a
Linux d 5.10.0-17-amd64 #1 SMP Debian 5.10.136-1 (2022-08-13) x86_64 GNU/Linux
>cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
>go version
go version go1.20.4 linux/amd64

Additional context Slackdump version:

Slackdump dev (commit: placeholder) built on: 2077
dev

Built on git commit 74520fada6a3ba27d6e3dd671cfcba662a6f3cd2.

rusq commented 1 year ago

Confirmed. It was never populated.

The problem with this is that it's not possible to get it the "fast" way, because neither of conversations.list or conversations.info methods return it. To get the member list one has to explicitely call the https://api.slack.com/methods/conversations.members method, and paginate through results. On a workspace with thousands channels this can take a while.

Good news is, that in version 3, which is still in development, I changed the way the information is retrieved, and will be able to incorporate this improvement.

I'll flag this as an enhancement for v3.

rusq commented 1 year ago

And, thanks for such a nice explicit report, of course :)

svenssonaxel commented 1 year ago

Thank you for such a swift reply, and thank you for making slackdump!

Now to be frank, without a populated members list slackdump is not entirely usable. It seems that private channels with an unpopulated members list will (perhaps due to a bug in, or worse, intended behavior of, mmetl) be imported as open channels in mattermost, and thus jeopardize information security. It appears to me that the slack dump taking a minute, hour or day longer would be much preferable over the current behavior that (in the end result after mmetl) is quite undesirable.

I suppose my options now are: wait for v3, patch the current version myself, edit the .jsonl manually before import, or look for alternative ways to export from Slack. Could you offer any advice on the best course of action? Very sorry to turn this into a support request, feel free to refuse taking your time with it!

rusq commented 1 year ago

Hey, no problem. I wasn't aware of the way mattermost treats the DMs with missing members, of course that's unacceptable.

I'll aim to find some time and see what I can do on the weekend, this seems like a serious flaw to me as well.

Thank you for your support :)

svenssonaxel commented 1 year ago

@rusq Much appreciated, thank you so much!

rusq commented 1 year ago

Fixed in v2.4.0 (#221 )

TODO:

rusq commented 1 year ago

Hey @svenssonaxel , this is fixed now, you should see "members" populated (you can build from master, or use the v2.4.0 release)

NOTE: I'm unable to verify the "groups.json" because I don't have any workspace at my disposal that has the groups, I'd appreciate if you could check it and let me know.

svenssonaxel commented 1 year ago
rusq commented 1 year ago

Hey @svenssonaxel , how's it going? Did it work?

svenssonaxel commented 1 year ago

It did!

rusq commented 1 year ago

Excellent, thanks for update :)