Skip responsePrefix for HEARTBEAT_OK responses

Preserve exact match so warelay recognizes heartbeat responses
and doesn't send them as messages.
This commit is contained in:
Peter Steinberger
2025-11-29 06:02:21 +00:00
parent 8d20edb028
commit 37d8e55991

View File

@@ -615,9 +615,9 @@ export async function monitorWebProvider(
);
return;
}
// Apply response prefix if configured (for all messages)
// Apply response prefix if configured (skip for HEARTBEAT_OK to preserve exact match)
const responsePrefix = cfg.inbound?.responsePrefix;
if (responsePrefix && replyResult.text) {
if (responsePrefix && replyResult.text && replyResult.text.trim() !== HEARTBEAT_TOKEN) {
// Only add prefix if not already present
if (!replyResult.text.startsWith(responsePrefix)) {
replyResult.text = `${responsePrefix} ${replyResult.text}`;