mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 14:18:26 +00:00
feat(slack): include thread metadata (thread_ts, parent_user_id) in agent context
Adds thread_ts and parent_user_id to the Slack message footer for thread replies, giving agents awareness of thread context. Top-level messages remain unchanged. Includes tests verifying: - Thread replies include thread_ts and parent_user_id in footer - Top-level messages exclude thread metadata
This commit is contained in:
committed by
Peter Steinberger
parent
23e4183608
commit
2b9d5e6e30
@@ -399,7 +399,10 @@ export async function prepareSlackMessage(params: {
|
||||
GroupSubject: isRoomish ? roomLabel : undefined,
|
||||
From: slackFrom,
|
||||
}) ?? (isDirectMessage ? senderName : roomLabel);
|
||||
const textWithId = `${rawBody}\n[slack message id: ${message.ts} channel: ${message.channel}]`;
|
||||
const threadInfo = message.thread_ts
|
||||
? ` thread_ts: ${message.thread_ts}${message.parent_user_id ? ` parent_user: ${message.parent_user_id}` : ""}`
|
||||
: "";
|
||||
const textWithId = `${rawBody}\n[slack message id: ${message.ts} channel: ${message.channel}${threadInfo}]`;
|
||||
const storePath = resolveStorePath(ctx.cfg.session?.store, {
|
||||
agentId: route.agentId,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user