feat(inbound-meta): expose sender_id in trusted system metadata

Add sender_id (ctx.SenderId) to the openclaw.inbound_meta.v1 payload
so agents can reference it for moderation actions (delete, ban, etc.)
without relying on user-controlled text fields.

message_id and chat_id were already present; sender_id was the missing
piece needed for complete group moderation workflows.
This commit is contained in:
Artemii
2026-02-16 17:33:54 +00:00
committed by Peter Steinberger
parent bcab2469de
commit d4c057f8c1
2 changed files with 30 additions and 0 deletions

View File

@@ -24,6 +24,7 @@ export function buildInboundMetaSystemPrompt(ctx: TemplateContext): string {
schema: "openclaw.inbound_meta.v1",
message_id: messageId,
message_id_full: messageIdFull && messageIdFull !== messageId ? messageIdFull : undefined,
sender_id: safeTrim(ctx.SenderId),
chat_id: chatId,
reply_to_id: replyToId,
channel: safeTrim(ctx.OriginatingChannel) ?? safeTrim(ctx.Surface) ?? safeTrim(ctx.Provider),