diff --git a/CHANGELOG.md b/CHANGELOG.md index d22f5ca9..fef31175 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - 认证:修复登录页面刷新验证码时布局抖动的问题。 - 统计:修复积分统计中的积分值。 - 分区:修复开启帖子筛选条件时,显示没有置顶帖的问题。 +- 消息:修复解析7天内的公共消息时失败的问题。 ### Changed diff --git a/lib/features/notification/models/message.dart b/lib/features/notification/models/message.dart index 4e3770b2..4276f224 100644 --- a/lib/features/notification/models/message.dart +++ b/lib/features/notification/models/message.dart @@ -157,10 +157,12 @@ final class BroadcastMessage with BroadcastMessageMappable { } final message = infoNode.querySelector('span')?.innerText.trim(); final messageTime = infoNode - .querySelector('span.xg1') - ?.innerText - .trim() - .parseToDateTimeUtc8(); + .querySelector('span.xg1') + ?.innerText + .trim() + .parseToDateTimeUtc8() ?? + // Less than 7 days + infoNode.querySelector('span.xg1 > span')?.title?.parseToDateTimeUtc8(); final redirectUrl = infoNode .querySelector('a') ?.attributes['href']