feat(discord): smart auto-thread mode#1053
Closed
Hypn0sis wants to merge 5 commits intoRightNow-AI:mainfrom
Closed
feat(discord): smart auto-thread mode#1053Hypn0sis wants to merge 5 commits intoRightNow-AI:mainfrom
Hypn0sis wants to merge 5 commits intoRightNow-AI:mainfrom
Conversation
1bae8fa to
0c20d0e
Compare
wasmtime 41.0.4 had 10 CVEs (RUSTSEC-2026-0085..0096) including two critical sandbox-escape vulnerabilities. Upgraded to 43.0.1 which fixes all of them. rumqttc 0.24 pulled in rustls-webpki 0.102.8 (RUSTSEC-2026-0049, faulty CRL matching). rumqttc 0.25 resolves the transitive dependency. copy and func_wrap closures must return wasmtime::Result<T>.
… CVE rumqttc 0.25 still pins rustls-webpki 0.102.8 (RUSTSEC-2026-0049) via its default use-rustls feature. The MQTT adapter does not actually use TLS (the use_tls branch is a no-op stub), so switch to use-native-tls with default-features = false to eliminate the vulnerable transitive dependency entirely.
Contributor
Author
|
Closing in favour of two separate PRs: fix(deps) CVEs → #1041, feat(discord) smart auto-thread → new PR. |
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
Test plan
cargo check --workspace --libpassescargo clippy -p openfang-channels -p openfang-types -p openfang-api -- -D warningspassescargo test -p openfang-channels -p openfang-typespassesauto_thread = "smart", mention bot in a server channel → thread createdauto_thread = "smart", message without mention → no threadauto_thread = "false"→ no threads ever