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

is there a way to delete 1:1 DM by creating & using some sort of MEMBER-SPECIFIC token? #39

Closed
jpwynn opened this issue Oct 22, 2020 · 3 comments
Assignees
Labels
answered question Further information is requested

Comments

@jpwynn
Copy link

jpwynn commented Oct 22, 2020

readme says: You can only delete your own messages, not the ones of others. This is due to a restriction in the Slack API and there is nothing one can do about it.

If our members are A, B, C I understand that the normal admin token used for deleting channel messages wont work for 1:1 DMs.

But if we dont mind having user-specific versions of Slackcleaner, is it possible to create some kind of "token A" on Slack that WOULD permit SlackCleaner delete DMs from member A, and another token for member B, etc?

Or is that what the readme is saying is that Slack literally offers zero API method for user A to delete their own DMs?

@sgratzl
Copy link
Owner

sgratzl commented Oct 22, 2020

yes, each token owner can delete his/her own direct messages. I used a similar a approach in which I collected a token from each user and then run a clean operation for each user individually. This will also allow you to clean all private channels, since any token owner can only see the private channels he/she is a member of.

@sgratzl sgratzl added the question Further information is requested label Oct 22, 2020
@sgratzl sgratzl self-assigned this Oct 22, 2020
@jpwynn
Copy link
Author

jpwynn commented Oct 22, 2020

Thank you Samuel!

Can you point the way to whereever a member of my slack space would "create or get" whatever token they need to give me? (Sounds like one must log in AS that user to get/create that user's correct token, the admin cannot get it on their own?)

@sgratzl
Copy link
Owner

sgratzl commented Oct 23, 2020

haven't done that in a while but each user just needs to follow: https://github.com/sgratzl/slack_cleaner2#token.

@sgratzl sgratzl closed this as completed Nov 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants