1
0
mirror of https://github.com/freescout-helpdesk/freescout.git synced 2024-11-25 03:43:33 +01:00

Update conversation preview on reply

This commit is contained in:
FreeScout 2018-12-08 02:14:37 -08:00
parent 40771d962e
commit 6f8c002349
2 changed files with 9 additions and 2 deletions

View File

@ -33,6 +33,13 @@ class ThreadObserver
if ($conversation->source_via == Conversation::PERSON_CUSTOMER) {
$conversation->read_by_user = false;
}
// Update preview.
if (in_array($thread->type, [Thread::TYPE_CUSTOMER, Thread::TYPE_MESSAGE, Thread::TYPE_NOTE]) && $thread->state == Thread::STATE_PUBLISHED && $conversation->threads_count > 1)
{
$conversation->setPreview($thread->body);
}
$conversation->save();
}
}

View File

@ -170,11 +170,11 @@
@endif
</h3>
@if ($thread->type != App\Thread::TYPE_NOTE)
{{--@if ($thread->type != App\Thread::TYPE_NOTE)
<p style="display:inline; font-family:Arial, 'Helvetica Neue', Helvetica, Tahoma, sans-serif; color:#B5B9BD; font-size:11.5px; line-height:18px; margin:0;">
@if ($thread->user_id){{ __('Assigned:') }} {{ $thread->getAssigneeName(true, $user) }} &nbsp;&nbsp;&nbsp; @endif{{ __('Status:') }} {{ $thread->getStatusName() }}<br>
</p>
@endif
@endif--}}
</td>
<td valign="top">
<div style="font-family:Arial, 'Helvetica Neue', Helvetica, Tahoma, sans-serif; color:#B5B9BD; font-size:12px; line-height:18px; margin:0;" align="right">{{ App\User::dateFormat($thread->created_at, 'M j, H:i', $user) }}</div>