mirror of
https://github.com/discourse/discourse.git
synced 2025-09-05 08:59:27 +08:00
FIX: don't send out elided message in email notifications
UX: improved details tag for elided messages
This commit is contained in:
parent
bf209d8344
commit
6d84a8a1b3
6 changed files with 56 additions and 12 deletions
|
@ -56,9 +56,14 @@ module Email
|
|||
@incoming_email.update_columns(user_id: user.id)
|
||||
|
||||
body, elided = select_body
|
||||
|
||||
body ||= ""
|
||||
body << "\n\n[details=...]\n#{elided}\n[/details]" if elided.present?
|
||||
|
||||
if elided.present?
|
||||
body << "\n\n" << "<details class='elided'>" << "\n"
|
||||
body << "<summary title='#{I18n.t('emails.incoming.show_trimmed_content')}'>···</summary>" << "\n"
|
||||
body << elided << "\n"
|
||||
body << "</details>" << "\n"
|
||||
end
|
||||
|
||||
raise AutoGeneratedEmailError if is_auto_generated?
|
||||
raise NoBodyDetectedError if body.blank? && !@mail.has_attachments?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue