mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
f
This commit is contained in:
committed by
Peter Steinberger
parent
c315246971
commit
a42ccb9c1d
@@ -274,7 +274,6 @@ function getMentionedOpenIdsFromPost(content: string): string[] {
|
||||
/**
|
||||
* Parse post (rich text) content and extract embedded image keys.
|
||||
* Post structure: { title?: string, content: [[{ tag, text?, image_key?, ... }]] }
|
||||
* or { zh_cn: { title?, content: [...] } } when received from Feishu.
|
||||
*/
|
||||
function parsePostContent(content: string): {
|
||||
textContent: string;
|
||||
@@ -282,9 +281,8 @@ function parsePostContent(content: string): {
|
||||
} {
|
||||
try {
|
||||
const parsed = JSON.parse(content);
|
||||
const locale = parsed.zh_cn ?? parsed;
|
||||
const title = locale.title || "";
|
||||
const contentBlocks = locale.content || [];
|
||||
const title = parsed.title || "";
|
||||
const contentBlocks = parsed.content || [];
|
||||
let textContent = title ? `${title}\n\n` : "";
|
||||
const imageKeys: string[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user