|
@@ -960,9 +960,10 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
$chat_group_msg = ChatRecords::where('user_id', $user_id)
|
|
|
->where('is_read', 0)
|
|
|
->where('talk_type', 2)
|
|
|
+ ->leftJoin('chat_groups', 'chat_records.receiver_id', '=', 'chat_groups.id')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
->limit(5)
|
|
|
- ->get(['id', 'content', 'updated_at'])
|
|
|
+ ->get(['chat_records.id', 'content as content1', 'chat_records.updated_at', 'chat_groups.group_name as content'])
|
|
|
->map(function ($item) use ($now) {
|
|
|
$item->class = "群聊";
|
|
|
$item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
|
|
@@ -978,7 +979,7 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
->get(['chat_topics.id', 'chat_topics.content', 'chat_topics.updated_at'])
|
|
|
->map(function ($item) use ($now) {
|
|
|
$item->class = "话题";
|
|
|
- $item->content = $item->content . '话题有回复了';
|
|
|
+ // $item->content = $item->content;
|
|
|
$item->formatted_updated_at = $this->timeAgo($item->updated_at, $now);
|
|
|
return $item;
|
|
|
});
|