Description
Related: #973 (rustls CryptoProvider panic was fixed in 320d059, but the remaining issues below are still open)
Bugs
1. api_url config field is ignored
channel_bridge.rs line ~1460 calls RevoltAdapter::new(token) which uses the hardcoded default https://api.revolt.chat. The api_url from RevoltConfig is never passed through. Should use RevoltAdapter::with_urls() instead.
2. No ws_url config field
RevoltConfig has api_url but no ws_url. The WebSocket URL is hardcoded to wss://ws.revolt.chat. Self-hosted instances need to configure both.
3. Group chat @mentions are silently dropped
parse_revolt_message() doesn't set metadata["was_mentioned"]. The bridge checks this field when group_policy=mention_only (the default), so all group messages — including direct @mentions — are ignored.
Expected Behavior
Fix: check the mentions array from Revolt's WebSocket payload for the bot's user ID:
let was_mentioned = data
.get("mentions")
.and_then(|m| m.as_array())
.map(|arr| arr.iter().any(|v| v.as_str() == Some(bot_user_id)))
.unwrap_or(false);
metadata.insert("was_mentioned".to_string(), serde_json::Value::Bool(was_mentioned));
Steps to Reproduce
Bugs 1 + 2 (self-hosted)
- Set up a self-hosted Revolt instance (e.g.
https://chat.example.com)
- Create a bot and copy its token
- Configure OpenFang:
[channels.revolt]
api_url = "https://chat.example.com/api"
ws_url = "wss://chat.example.com/ws"
bot_token_env = "REVOLT_BOT_TOKEN"
default_agent = "assistant"
- Set the token:
export REVOLT_BOT_TOKEN="your-self-hosted-bot-token"
- Start OpenFang — the daemon logs
Revolt authentication failed 401 Unauthorized because it authenticates against the hardcoded https://api.revolt.chat instead of your configured api_url. The self-hosted bot token is invalid on the public API.
- Even if
api_url were fixed, the WebSocket would still connect to the hardcoded wss://ws.revolt.chat — self-hosted instances typically serve the Bonfire WebSocket at a different URL (e.g. wss://chat.example.com/ws), and there's no ws_url config field to set it.
Bug 3 (any Revolt instance, including public)
- Get a working Revolt bot connected (using the public API, where bugs 1+2 don't apply)
- Add the bot to a server/group channel
- Send
@BotName hello in the group channel
- The bot does not respond — logs show:
Ignoring group message on revolt (group_policy=mention_only, not mentioned)
- The Revolt WebSocket payload includes
"mentions":["<bot_user_id>"] but parse_revolt_message() never reads this field or sets metadata["was_mentioned"], so the bridge drops it
OpenFang Version
0.5.5
Operating System
Linux (x86_64)
Logs / Screenshots
Note Cargo.toml reports
0.5.1
Description
Related: #973 (rustls CryptoProvider panic was fixed in 320d059, but the remaining issues below are still open)
Bugs
1.
api_urlconfig field is ignoredchannel_bridge.rsline ~1460 callsRevoltAdapter::new(token)which uses the hardcoded defaulthttps://api.revolt.chat. Theapi_urlfromRevoltConfigis never passed through. Should useRevoltAdapter::with_urls()instead.2. No
ws_urlconfig fieldRevoltConfighasapi_urlbut nows_url. The WebSocket URL is hardcoded towss://ws.revolt.chat. Self-hosted instances need to configure both.3. Group chat @mentions are silently dropped
parse_revolt_message()doesn't setmetadata["was_mentioned"]. The bridge checks this field whengroup_policy=mention_only(the default), so all group messages — including direct @mentions — are ignored.Expected Behavior
Fix: check the
mentionsarray from Revolt's WebSocket payload for the bot's user ID:Steps to Reproduce
Bugs 1 + 2 (self-hosted)
https://chat.example.com)export REVOLT_BOT_TOKEN="your-self-hosted-bot-token"Revolt authentication failed 401 Unauthorizedbecause it authenticates against the hardcodedhttps://api.revolt.chatinstead of your configuredapi_url. The self-hosted bot token is invalid on the public API.api_urlwere fixed, the WebSocket would still connect to the hardcodedwss://ws.revolt.chat— self-hosted instances typically serve the Bonfire WebSocket at a different URL (e.g.wss://chat.example.com/ws), and there's nows_urlconfig field to set it.Bug 3 (any Revolt instance, including public)
@BotName helloin the group channelIgnoring group message on revolt (group_policy=mention_only, not mentioned)"mentions":["<bot_user_id>"]butparse_revolt_message()never reads this field or setsmetadata["was_mentioned"], so the bridge drops itOpenFang Version
0.5.5
Operating System
Linux (x86_64)
Logs / Screenshots
Note Cargo.toml reports
0.5.1