feat(discord): smart auto-thread mode (true/false/smart)#1054
Open
Hypn0sis wants to merge 9 commits intoRightNow-AI:mainfrom
Open
feat(discord): smart auto-thread mode (true/false/smart)#1054Hypn0sis wants to merge 9 commits intoRightNow-AI:mainfrom
Hypn0sis wants to merge 9 commits intoRightNow-AI:mainfrom
Conversation
…e_if, redundant_closure)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
auto_threadconfig field toDiscordConfigwith three modes:"true"— always create a thread from each message"false"— never create a thread (default, opt-in)"smart"— create a thread only when the bot is @mentionedMESSAGE_UPDATEevents (Discord embed resolution) are deduplicated against already-forwardedMESSAGE_CREATEevents to prevent double responsesapi_send_thread_messageto POST directly tochannels/{thread_id}/messages(the correct Discord API endpoint for threads)RevoltAdapter::with_urls_and_channelsconstructor to support custom URLs + channel restrictions togetherConfig example
CI note
The Security Audit check may flag
rustls-webpki 0.102— that CVE is addressed in #1041 (already open). If that PR merges first, a rebase of this branch will clear the audit cleanly. Thefix: clippycommit in this PR may also overlap with #1041's fixes tocopilot.rs; a rebase will resolve any conflict trivially.Test plan
cargo check --workspace --libpassescargo clippy --workspace --all-targets -- -D warningspassescargo test --workspacepassesauto_thread = "smart", @mention bot in server channel → thread createdauto_thread = "smart", message without @mention → no thread createdauto_thread = "false"→ no threads ever created