mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
fix: 更新消息预览文本获取方法
- 将获取消息预览文本的方法从 previewTextMsg 更新为 previewMsg,以适应新的消息结构 - 确保在处理消息时使用最新的预览文本获取逻辑
This commit is contained in:
parent
e533bd7e35
commit
89bdd86f14
@ -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);
|
||||
}
|
||||
|
||||
// 如果没有预览文本,使用消息类型作为标题
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user