Skip to content

fix: apply -member-only to channels discovered by resume -refresh - #758

Merged
rusq merged 1 commit into
rusq:masterfrom
beeckrumi0000:fix/resume-refresh-member-only
Oct 31, 2026
Merged

rusq merged 1 commit into
rusq:masterfrom
beeckrumi0000:fix/resume-refresh-member-only

Conversation

@beeckrumi0000

Copy link
Copy Markdown
Contributor

Fixes #757.

resume -refresh builds a combinedGenerator, which never received flags.MemberOnly, so combinedChannels emitted every channel returned by the API. With a bot token, the first public channel the bot is not in failed with not_in_channel and stopped the resume.

This passes MemberOnly to combinedGenerator and makes combinedChannels skip public non-member channels with structures.IsMember, the same check chanFilter uses on the non-refresh path. Channels already in the list are still emitted as before.

Test: a new Test_combinedGenerator_Generate case lists one public member, one public non-member and two non-public channels with memberOnly set, and expects the non-member public channel to be skipped. go test ./... passes.

@rusq rusq left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@rusq
rusq merged commit a5d5956 into rusq:master Oct 31, 2026
4 checks passed
@beeckrumi0000

Copy link
Copy Markdown
Contributor Author

Thanks for the review and the merge — and for maintaining slackdump.

We run it in production (bot token, -member-only, incremental resume), and this bug is exactly why our archive script carries a workaround: it resumes without -refresh and we add newly invited channels by id by hand. With #758 in, we would like to drop that and let resume discover channels again.

Would you consider cutting a release that includes it? No expectations on timing — your usual cadence is fine. We would just rather stay on official release artifacts than build from a commit. Thanks again!

@rusq

rusq commented Nov 1, 2026

Copy link
Copy Markdown
Owner

Understood, will cook one now. Thank you for sharing your use case! I'm always interested to learn these kind of facts :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

resume -refresh ignores -member-only

2 participants