fix(together): x.com などドメイン名タイトルをJina取得タイトルで上書き
This commit is contained in:
parent
324d892b28
commit
7446568adf
12
server.js
12
server.js
|
|
@ -2632,9 +2632,17 @@ ${excerpt}
|
|||
}
|
||||
} catch (_) {}
|
||||
|
||||
// x.com など既存タイトルがドメイン名のみの場合は Jina タイトルで上書き
|
||||
await pool.query(
|
||||
`UPDATE together_shares SET full_content=$1, title=COALESCE(title, $2) WHERE id=$3`,
|
||||
[fullContent, jinaTitle, shareId]
|
||||
`UPDATE together_shares
|
||||
SET full_content=$1,
|
||||
title=CASE
|
||||
WHEN title IS NULL THEN $2
|
||||
WHEN $2 IS NOT NULL AND title = (regexp_replace($3, '^https?://(www\.)?', ''))::text THEN $2
|
||||
ELSE title
|
||||
END
|
||||
WHERE id=$4`,
|
||||
[fullContent, jinaTitle, url, shareId]
|
||||
);
|
||||
|
||||
function parseGeminiJson(raw) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue