diff --git a/.github/workflows/syslog-pipeline.yml b/.github/workflows/syslog-pipeline.yml index 09a61763..6eb8073a 100644 --- a/.github/workflows/syslog-pipeline.yml +++ b/.github/workflows/syslog-pipeline.yml @@ -57,7 +57,7 @@ jobs: echo "has_syslog=true" >> "$GITHUB_OUTPUT" echo "syslog_file=$LATEST" >> "$GITHUB_OUTPUT" - SENDER_OPEN_ID=$(jq -r '.sender_open_id // empty' "$LATEST" 2>/dev/null || true) + SENDER_OPEN_ID=$(jq -r '.sender_open_id // .sender_id // empty' "$LATEST" 2>/dev/null || true) CHAT_ID=$(jq -r '.chat_id // empty' "$LATEST" 2>/dev/null || true) SENDER_NAME=$(jq -r '.sender_name // empty' "$LATEST" 2>/dev/null || true) @@ -156,6 +156,13 @@ jobs: fi fi + if [ -z "$SUBMIT_CONTENT" ]; then + echo "⚠️ SUBMIT_CONTENT 为空,跳过人格体唤醒" + echo "broadcast_title=" >> "$GITHUB_OUTPUT" + echo "broadcast_url=" >> "$GITHUB_OUTPUT" + exit 0 + fi + if node scripts/wake-persona.js; then echo "✅ 人格体唤醒成功" else diff --git a/scripts/write-notion-syslog.js b/scripts/write-notion-syslog.js index ffa94f98..c4c70af1 100644 --- a/scripts/write-notion-syslog.js +++ b/scripts/write-notion-syslog.js @@ -128,7 +128,7 @@ async function main() { const syslogText = entry.syslog_raw || entry.syslog || entry.content || ''; const source = entry.source || 'unknown'; const senderName = entry.sender_name || ''; - const senderOpenId = entry.sender_open_id || ''; + const senderOpenId = entry.sender_open_id || entry.sender_id || ''; const chatId = entry.chat_id || ''; const timestamp = entry.timestamp || new Date().toISOString(); const dateStr = timestamp.split('T')[0] || new Date().toISOString().split('T')[0];