fix: sender_id兼容 + 空内容跳过人格体唤醒
Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
This commit is contained in:
parent
e44990d776
commit
d8665f5816
|
|
@ -57,7 +57,7 @@ jobs:
|
||||||
echo "has_syslog=true" >> "$GITHUB_OUTPUT"
|
echo "has_syslog=true" >> "$GITHUB_OUTPUT"
|
||||||
echo "syslog_file=$LATEST" >> "$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)
|
CHAT_ID=$(jq -r '.chat_id // empty' "$LATEST" 2>/dev/null || true)
|
||||||
SENDER_NAME=$(jq -r '.sender_name // 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
|
||||||
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
|
if node scripts/wake-persona.js; then
|
||||||
echo "✅ 人格体唤醒成功"
|
echo "✅ 人格体唤醒成功"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ async function main() {
|
||||||
const syslogText = entry.syslog_raw || entry.syslog || entry.content || '';
|
const syslogText = entry.syslog_raw || entry.syslog || entry.content || '';
|
||||||
const source = entry.source || 'unknown';
|
const source = entry.source || 'unknown';
|
||||||
const senderName = entry.sender_name || '';
|
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 chatId = entry.chat_id || '';
|
||||||
const timestamp = entry.timestamp || new Date().toISOString();
|
const timestamp = entry.timestamp || new Date().toISOString();
|
||||||
const dateStr = timestamp.split('T')[0] || new Date().toISOString().split('T')[0];
|
const dateStr = timestamp.split('T')[0] || new Date().toISOString().split('T')[0];
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue