Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch entire channel and threads #25

Open
mwarkentin opened this issue Dec 14, 2022 · 1 comment
Open

Fetch entire channel and threads #25

mwarkentin opened this issue Dec 14, 2022 · 1 comment

Comments

@mwarkentin
Copy link

This is a bigger request, but it would be nice if I could specify that I want to fetch an entire channel, including thread contents.

Use case: we have a 30 day retention policy on our Slack content, but would like to be able to archive our incident response channels for long-term. This tool is working great so far but it's missing out on the contents in the threads so I would need to go through and run it many times to capture each thread.

Seems valuable but also potentially complex (pagination (#4 ), how do you render threads mixed in with the output (<details> blocks could work quite well..) so I'm interested to hear if this is something you'd consider!

@rneatherway
Copy link
Owner

Right, interesting. Currently the tool wraps the whole output in <details> if you pass -d, which I like for keeping an archive neat as a reference in an issue comment.

I think you could more <details> tags to include threads collapsed by default, something like this:

Click to expand
  • Click to expand
  • Click to expand

It does get more complicated though because you start having to output more HTML.

If you want to go down this route I'd suggest teaching the existing History method (in the "Otherwise we read the general channel history") to fetch and output threads that it finds as well as a first step. The return type will need to change to allow nested responses (perhaps make it a struct and add a map from ids or timestamps to another HistoryResponse).

This is certainly doable, but it wouldn't be a five minute change! I am happy to answer questions if you do want to work on it.

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

No branches or pull requests

2 participants