From 7446568adfc8b53593d66765d6dd0e69b571fddd Mon Sep 17 00:00:00 2001 From: posimai Date: Wed, 22 Apr 2026 10:21:00 +0900 Subject: [PATCH] =?UTF-8?q?fix(together):=20x.com=20=E3=81=AA=E3=81=A9?= =?UTF-8?q?=E3=83=89=E3=83=A1=E3=82=A4=E3=83=B3=E5=90=8D=E3=82=BF=E3=82=A4?= =?UTF-8?q?=E3=83=88=E3=83=AB=E3=82=92Jina=E5=8F=96=E5=BE=97=E3=82=BF?= =?UTF-8?q?=E3=82=A4=E3=83=88=E3=83=AB=E3=81=A7=E4=B8=8A=E6=9B=B8=E3=81=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/server.js b/server.js index 380abc0d..289fa3d3 100644 --- a/server.js +++ b/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) {