From ec408a2aff2ae99453d333c56546645703f2f287 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 11 Dec 2025 18:20:50 +0800 Subject: [PATCH] fix: lark message timestamp --- astrbot/core/platform/sources/lark/lark_adapter.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/astrbot/core/platform/sources/lark/lark_adapter.py b/astrbot/core/platform/sources/lark/lark_adapter.py index 473be096f..e63972e1e 100644 --- a/astrbot/core/platform/sources/lark/lark_adapter.py +++ b/astrbot/core/platform/sources/lark/lark_adapter.py @@ -2,6 +2,7 @@ import asyncio import base64 import json import re +import time import uuid from typing import cast @@ -137,7 +138,11 @@ class LarkPlatformAdapter(Platform): return abm = AstrBotMessage() - abm.timestamp = cast(int, message.create_time) // 1000 + + if message.create_time: + abm.timestamp = int(message.create_time) // 1000 + else: + abm.timestamp = int(time.time()) abm.message = [] abm.type = ( MessageType.GROUP_MESSAGE