mirror of
https://github.com/freescout-helpdesk/freescout.git
synced 2024-11-25 03:43:33 +01:00
Sort threads in emails to customers by thread ID instead of created_at - closes #532
This commit is contained in:
parent
9a1ae415ce
commit
7451223e09
@ -51,7 +51,7 @@ class SendNotificationToUsers implements ShouldQueue
|
|||||||
|
|
||||||
// Threads has to be sorted here, if sorted before, they come here in wrong order
|
// Threads has to be sorted here, if sorted before, they come here in wrong order
|
||||||
$this->threads = $this->threads->sortByDesc(function ($item, $key) {
|
$this->threads = $this->threads->sortByDesc(function ($item, $key) {
|
||||||
return $item->created_at;
|
return $item->id;
|
||||||
});
|
});
|
||||||
|
|
||||||
$headers = [];
|
$headers = [];
|
||||||
|
@ -87,7 +87,7 @@ class SendReplyToCustomer implements ShouldQueue
|
|||||||
|
|
||||||
// Threads has to be sorted here, if sorted before, they come here in wrong order
|
// Threads has to be sorted here, if sorted before, they come here in wrong order
|
||||||
$this->threads = $this->threads->sortByDesc(function ($item, $key) {
|
$this->threads = $this->threads->sortByDesc(function ($item, $key) {
|
||||||
return $item->created_at;
|
return $item->id;
|
||||||
});
|
});
|
||||||
|
|
||||||
$new = false;
|
$new = false;
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
{!! $thread->body !!}
|
{!! $thread->body !!}
|
||||||
|
|
||||||
@action('reply_email.before_signature', $thread, $loop, $threads, $conversation, $mailbox)
|
@action('reply_email.before_signature', $thread, $loop, $threads, $conversation, $mailbox)
|
||||||
@if ($thread->source_via == App\Thread::PERSON_USER)
|
@if ($thread->source_via == App\Thread::PERSON_USER && \Eventy::filter('reply_email.include_signature', true, $thread))
|
||||||
<br>{!! $conversation->getSignatureProcessed(['thread' => $thread]) !!}
|
<br>{!! $conversation->getSignatureProcessed(['thread' => $thread]) !!}
|
||||||
@endif
|
@endif
|
||||||
@action('reply_email.after_signature', $thread, $loop, $threads, $conversation, $mailbox)
|
@action('reply_email.after_signature', $thread, $loop, $threads, $conversation, $mailbox)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
@if (!$loop->first)## {{--@if ($loop->last){{ __(':person sent a message', ['person' => $thread->getFromName($mailbox)]) }}@else {{ __(':person replied', ['person' => $thread->getFromName($mailbox)]) }}@endif--}}{{ $thread->getFromName($mailbox) }}, {{ __('on :date', ['date' => App\Customer::dateFormat($thread->created_at, 'M j @ H:i')]) }} ({{ \Config::get('app.timezone') }}):@endif
|
@if (!$loop->first)## {{--@if ($loop->last){{ __(':person sent a message', ['person' => $thread->getFromName($mailbox)]) }}@else {{ __(':person replied', ['person' => $thread->getFromName($mailbox)]) }}@endif--}}{{ $thread->getFromName($mailbox) }}, {{ __('on :date', ['date' => App\Customer::dateFormat($thread->created_at, 'M j @ H:i')]) }} ({{ \Config::get('app.timezone') }}):@endif
|
||||||
{{-- Html2Text\Html2Text::convert($thread->body) - this was causing "AttValue: " expected in Entity" error sometimes --}}{{ (new Html2Text\Html2Text($thread->body))->getText() }}
|
{{-- Html2Text\Html2Text::convert($thread->body) - this was causing "AttValue: " expected in Entity" error sometimes --}}{{ (new Html2Text\Html2Text($thread->body))->getText() }}
|
||||||
@if ($thread->source_via == App\Thread::PERSON_USER)
|
@if ($thread->source_via == App\Thread::PERSON_USER && \Eventy::filter('reply_email.include_signature', true, $thread))
|
||||||
|
|
||||||
{{-- Html2Text\Html2Text::convert($conversation->mailbox->signature) --}}{{ (new Html2Text\Html2Text($conversation->getSignatureProcessed(['thread' => $thread])))->getText() }}
|
{{-- Html2Text\Html2Text::convert($conversation->mailbox->signature) --}}{{ (new Html2Text\Html2Text($conversation->getSignatureProcessed(['thread' => $thread])))->getText() }}
|
||||||
@endif
|
@endif
|
||||||
|
Loading…
Reference in New Issue
Block a user