Skip to content

fix(ChannelManager): Remove threads from cache upon deletion #10883

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

Merged
merged 3 commits into from
May 9, 2025

Conversation

Jiralite
Copy link
Member

@Jiralite Jiralite commented May 4, 2025

Please describe the changes this PR makes and why it should be merged:
If a channel with threads is deleted, the threads are still accessible in the channel manager and the guild channel manager. This clears them.

Resolves #10871.

Status and versioning classification:

  • Code changes have been tested against the Discord API, or there are no code changes
  • I know how to update typings and have done so, or typings don't need updating

Copy link

vercel bot commented May 4, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
discord-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 9, 2025 11:02am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
discord-js-guide ⬜️ Ignored (Inspect) Visit Preview May 9, 2025 11:02am

@Qjuh
Copy link
Member

Qjuh commented May 7, 2025

What if the ClientUser was in one of those threads, then the threadDelete event for that thread won‘t emit correctly now anymore.

@Jiralite
Copy link
Member Author

Jiralite commented May 7, 2025

THREAD_DELETE is not sent when you delete parent channels. Did you mean something else?

@Jiralite Jiralite requested a review from Qjuh May 7, 2025 18:09
@github-project-automation github-project-automation bot moved this from Todo to Review Approved in discord.js May 9, 2025
@kodiakhq kodiakhq bot merged commit 4f6fedf into main May 9, 2025
8 checks passed
@kodiakhq kodiakhq bot deleted the fix/trailing-thread-cache branch May 9, 2025 11:06
@github-project-automation github-project-automation bot moved this from Review Approved to Done in discord.js May 9, 2025
Jiralite added a commit that referenced this pull request May 9, 2025
* fix(ChannelManager): remove threads from cache upon deletion

* refactor: loop over thread ids

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Threads not deleted with a forum channel
5 participants