egg_server/test/archive/getChatHistory.ts
zhaoyingbo 9545670a51
All checks were successful
Egg Server CI/CD / build-image (push) Successful in 45s
Egg Server CI/CD / refresh-image (push) Successful in 12s
Egg Server CI/CD / fast-deploy (push) Successful in 2s
feat: 支持清洗历史数据
2024-10-15 01:20:21 +00:00

15 lines
385 B
TypeScript

import { LarkService } from "../../services"
const service = new LarkService("egg", "")
const currentTime = Math.floor(new Date().getTime() / 1000)
const yesterdayTime = currentTime - 24 * 60 * 60
const res = await service.message.getHistory(
"oc_c83f627bde3da39b01bbbfb026a00111",
yesterdayTime.toString(),
currentTime.toString()
)
console.log(JSON.stringify(res, null, 2))