Skip to content

fix(auto-reply): Hide message_id and sender metadata in direct chats#24359

Closed
jd316 wants to merge 4 commits intoopenclaw:mainfrom
jd316:fix/auto-reply-direct-chat-metadata
Closed

fix(auto-reply): Hide message_id and sender metadata in direct chats#24359
jd316 wants to merge 4 commits intoopenclaw:mainfrom
jd316:fix/auto-reply-direct-chat-metadata

Conversation

@jd316
Copy link
Contributor

@jd316 jd316 commented Feb 23, 2026

Hides message_id, message_id_full, conversation_label, and sender metadata in direct chats to prevent untrusted metadata from cluttering the DM UI.

Scope

Limited to auto-reply only (2 files):

  • src/auto-reply/reply/inbound-meta.ts
  • src/auto-reply/reply/inbound-meta.test.ts

Closes #22054

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Greptile Summary

Hides message_id, message_id_full, reply_to_id, sender_id, conversation_label, and sender identifier in direct chats and openclaw-control-ui contexts to prevent untrusted metadata from cluttering DM interfaces.

  • Modified buildInboundUserContextPrefix() to conditionally hide all per-message and sender metadata when isDirect is true
  • Extended isDirect logic to include openclaw-control-ui sender ID (internal control interface)
  • Fixed test suite: changed ChatType: "direct" to "group" in tests that expect metadata to be present
  • Added test coverage for openclaw-control-ui special case behavior

Confidence Score: 5/5

  • Safe to merge - targeted security improvement with comprehensive test coverage
  • Implementation is clean and focused. The logic correctly uses conditional assignment based on isDirect flag. Test fixes are legitimate (tests expecting metadata must use group chats, not direct). New test coverage for openclaw-control-ui special case. No edge cases or error paths missed.
  • No files require special attention

Last reviewed commit: 7dc0351

(3/5) Reply to the agent's comments like "Can you suggest a fix for this @greptileai?" or ask follow-up questions!

@jd316
Copy link
Contributor Author

jd316 commented Feb 23, 2026

Closing as @obviyus was actively working on #22054 and preparing to merge it. Apologies for the duplicate.

@jd316 jd316 closed this Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant