refactor: centralize group sender identity

This commit is contained in:
Peter Steinberger
2026-01-17 03:31:57 +00:00
parent 204309dd3c
commit 3af391eec7
21 changed files with 236 additions and 222 deletions

View File

@@ -170,13 +170,13 @@ async function processMessage(
},
});
const rawBody = content.trim();
const fromLabel = isGroup
? `group:${chatId} from ${senderName || senderId}`
: senderName || `user:${senderId}`;
const body = deps.formatAgentEnvelope({
channel: "Zalo Personal",
from: fromLabel,
const rawBody = content.trim();
const fromLabel = isGroup
? `group:${chatId}`
: senderName || `user:${senderId}`;
const body = deps.formatAgentEnvelope({
channel: "Zalo Personal",
from: fromLabel,
timestamp: timestamp ? timestamp * 1000 : undefined,
body: rawBody,
});