mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
ChatService serialized PlatformMessageHistory records via bare model_dump(), causing created_at/updated_at to be emitted as naive ISO strings without a timezone suffix. The frontend new Date() parses such strings as local time per ES2015+, so UTC values were displayed as-is instead of converted. Add serialize_history_entry helper and apply it to get_session, get_thread, and update_message. This matches the SSE real-time path and session list path, ensuring the frontend consistently receives ISO strings with the +00:00 suffix across all code paths.