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

推荐订阅源

Y
Y Combinator Blog
博客园_首页
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Help Net Security
The Cloudflare Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
A
About on SuperTechFans
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
DataBreaches.Net
L
LangChain Blog
Stack Overflow Blog
Stack Overflow Blog
Jina AI
Jina AI
月光博客
月光博客
云风的 BLOG
云风的 BLOG
博客园 - 聂微东
Hugging Face - Blog
Hugging Face - Blog
雷峰网
雷峰网
C
Check Point Blog
V
V2EX
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Security Blog
Microsoft Security Blog

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(slack): normalize read timestamp bounds (#81338) · op...
honor2030 · 2026-05-14 · via Recent Commits to openclaw:main

@@ -118,4 +118,97 @@ describe("readSlackMessages", () => {

118118

hasMore: false,

119119

});

120120

});

121+122+

it("passes Slack timestamp strings through to history bounds", async () => {

123+

const client = createClient();

124+125+

await readSlackMessages("C1", {

126+

client,

127+

before: "1712345678.654321",

128+

after: "1712340000.000001",

129+

token: "xoxb-test",

130+

});

131+132+

expect(client.conversations.history).toHaveBeenCalledWith({

133+

channel: "C1",

134+

limit: undefined,

135+

latest: "1712345678.654321",

136+

oldest: "1712340000.000001",

137+

});

138+

});

139+140+

it("converts ISO date strings to epoch seconds for history bounds", async () => {

141+

const client = createClient();

142+143+

await readSlackMessages("C1", {

144+

client,

145+

before: "2024-04-05T12:34:56.000Z",

146+

after: "2024-04-05T00:00:00.000Z",

147+

token: "xoxb-test",

148+

});

149+150+

expect(client.conversations.history).toHaveBeenCalledWith({

151+

channel: "C1",

152+

limit: undefined,

153+

latest: "1712320496",

154+

oldest: "1712275200",

155+

});

156+

});

157+158+

it("converts ISO date strings with offsets to epoch seconds for history bounds", async () => {

159+

const client = createClient();

160+161+

await readSlackMessages("C1", {

162+

client,

163+

before: "2024-04-05T12:34:56+03:00",

164+

after: "2024-04-05T12:34:56.789+03:00",

165+

token: "xoxb-test",

166+

});

167+168+

expect(client.conversations.history).toHaveBeenCalledWith({

169+

channel: "C1",

170+

limit: undefined,

171+

latest: "1712309696",

172+

oldest: "1712309696.789",

173+

});

174+

});

175+176+

it.each(["not-a-timestamp", "2024-02-30T00:00:00.000Z", "04/05/2024", "2024-04-05T12:34:56"])(

177+

"rejects invalid history bound %s with a clear timestamp error",

178+

async (before) => {

179+

const client = createClient();

180+181+

await expect(

182+

readSlackMessages("C1", {

183+

client,

184+

before,

185+

token: "xoxb-test",

186+

}),

187+

).rejects.toThrow(

188+

`Invalid Slack read before timestamp "${before}": expected a Slack timestamp or ISO-8601 date string`,

189+

);

190+

expect(client.conversations.history).not.toHaveBeenCalled();

191+

},

192+

);

193+194+

it("normalizes ISO date strings and Slack timestamp strings for thread reply bounds", async () => {

195+

const client = createClient();

196+197+

await readSlackMessages("C1", {

198+

client,

199+

threadId: "1712345678.000001",

200+

before: "2024-04-05T12:34:56.000Z",

201+

after: "1712340000.000001",

202+

token: "xoxb-test",

203+

});

204+205+

expect(client.conversations.replies).toHaveBeenCalledWith({

206+

channel: "C1",

207+

ts: "1712345678.000001",

208+

limit: undefined,

209+

latest: "1712320496",

210+

oldest: "1712340000.000001",

211+

});

212+

expect(client.conversations.history).not.toHaveBeenCalled();

213+

});

121214

});