惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Martin Fowler
Martin Fowler
Jina AI
Jina AI
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
I
InfoQ
L
LangChain Blog
The Cloudflare Blog
IT之家
IT之家
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Last Week in AI
Last Week in AI
Blog — PlanetScale
Blog — PlanetScale
罗磊的独立博客
云风的 BLOG
云风的 BLOG
Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
F
Fortinet All Blogs
博客园 - 聂微东
美团技术团队
博客园_首页

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(telegram): derive media placeholders from MIME · open...
vincentkoc · 2026-05-05 · via Recent Commits to openclaw:main

@@ -70,6 +70,64 @@ describe("resolveTelegramInboundBody", () => {

7070

});

7171

});

727273+

it("uses saved media MIME for no-caption photo placeholders", async () => {

74+

const result = await resolveTelegramBody({

75+

msg: {

76+

message_id: 3,

77+

date: 1_700_000_003,

78+

chat: { id: 42, type: "private", first_name: "Pat" },

79+

from: { id: 42, first_name: "Pat" },

80+

photo: [{ file_id: "photo-1", file_unique_id: "photo-u1", width: 120, height: 80 }],

81+

} as never,

82+

allMedia: [{ path: "/tmp/upload.bin", contentType: "application/octet-stream" }],

83+

});

84+85+

expect(result).toMatchObject({

86+

rawBody: "<media:image>",

87+

bodyText: "<media:document>",

88+

});

89+

});

90+91+

it("summarizes multiple saved images as images", async () => {

92+

const result = await resolveTelegramBody({

93+

msg: {

94+

message_id: 4,

95+

date: 1_700_000_004,

96+

chat: { id: 42, type: "private", first_name: "Pat" },

97+

from: { id: 42, first_name: "Pat" },

98+

photo: [{ file_id: "photo-2", file_unique_id: "photo-u2", width: 120, height: 80 }],

99+

} as never,

100+

allMedia: [

101+

{ path: "/tmp/photo-1.webp", contentType: "image/webp" },

102+

{ path: "/tmp/photo-2.png", contentType: "image/png" },

103+

],

104+

});

105+106+

expect(result).toMatchObject({

107+

bodyText: "<media:image> (2 images)",

108+

});

109+

});

110+111+

it("summarizes mixed saved media as attachments", async () => {

112+

const result = await resolveTelegramBody({

113+

msg: {

114+

message_id: 5,

115+

date: 1_700_000_005,

116+

chat: { id: 42, type: "private", first_name: "Pat" },

117+

from: { id: 42, first_name: "Pat" },

118+

photo: [{ file_id: "photo-3", file_unique_id: "photo-u3", width: 120, height: 80 }],

119+

} as never,

120+

allMedia: [

121+

{ path: "/tmp/photo.webp", contentType: "image/webp" },

122+

{ path: "/tmp/report.pdf", contentType: "application/pdf" },

123+

],

124+

});

125+126+

expect(result).toMatchObject({

127+

bodyText: "<media:document> (2 attachments)",

128+

});

129+

});

130+73131

it("does not transcribe group audio for unauthorized senders", async () => {

74132

transcribeFirstAudioMock.mockReset();

75133

const logger = { info: vi.fn() };