From 89bdd86f1456dbe4cbfe002f5c15b6d690ac7faa Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 24 Sep 2025 16:45:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E6=B6=88=E6=81=AF?= =?UTF-8?q?=E9=A2=84=E8=A7=88=E6=96=87=E6=9C=AC=E8=8E=B7=E5=8F=96=E6=96=B9?= =?UTF-8?q?=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将获取消息预览文本的方法从 previewTextMsg 更新为 previewMsg,以适应新的消息结构 - 确保在处理消息时使用最新的预览文本获取逻辑 --- app/Models/UserFavorite.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Models/UserFavorite.php b/app/Models/UserFavorite.php index ed46fe6c5..49af29132 100644 --- a/app/Models/UserFavorite.php +++ b/app/Models/UserFavorite.php @@ -245,10 +245,10 @@ class UserFavorite extends AbstractModel if ($favorite->favoritable_type === self::TYPE_MESSAGE && isset($messages[$favorite->favoritable_id])) { $message = $messages[$favorite->favoritable_id]; - // 使用 previewTextMsg 获取消息预览文本 + // 使用 previewMsg 获取消息预览文本 $previewText = ''; if ($message->msg && is_array($message->msg)) { - $previewText = WebSocketDialogMsg::previewTextMsg($message->msg); + $previewText = WebSocketDialogMsg::previewMsg($message); } // 如果没有预览文本,使用消息类型作为标题