mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 07:17:40 +00:00
fix(telegram): expand text_link entities in inbound text
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,7 @@ import {
|
||||
buildTelegramGroupFrom,
|
||||
buildTelegramGroupPeerId,
|
||||
buildTypingThreadParams,
|
||||
expandTextLinks,
|
||||
normalizeForwardedContext,
|
||||
describeReplyTarget,
|
||||
extractTelegramLocation,
|
||||
@@ -271,7 +272,8 @@ export const buildTelegramMessageContext = async ({
|
||||
|
||||
const locationData = extractTelegramLocation(msg);
|
||||
const locationText = locationData ? formatLocationText(locationData) : undefined;
|
||||
const rawText = (msg.text ?? msg.caption ?? "").trim();
|
||||
const rawTextSource = msg.text ?? msg.caption ?? "";
|
||||
const rawText = expandTextLinks(rawTextSource, msg.entities ?? msg.caption_entities).trim();
|
||||
let rawBody = [rawText, locationText].filter(Boolean).join("\n").trim();
|
||||
if (!rawBody) rawBody = placeholder;
|
||||
if (!rawBody && allMedia.length === 0) return null;
|
||||
|
||||
Reference in New Issue
Block a user