mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 20:54:31 +08:00
d2ddb140dd
Follow up to 4d3c1ceb44
, this commit
shows the SMTP response in the admin email sent list and also moves the
topic/post link into a new column. Reply key is now in its own column.
26 lines
592 B
Ruby
26 lines
592 B
Ruby
# frozen_string_literal: true
|
|
|
|
class EmailLogSerializer < ApplicationSerializer
|
|
include EmailLogsMixin
|
|
|
|
attributes :reply_key,
|
|
:bounced,
|
|
:has_bounce_key,
|
|
:smtp_transaction_response
|
|
|
|
has_one :user, serializer: BasicUserSerializer, embed: :objects
|
|
|
|
def include_reply_key?
|
|
reply_keys = @options[:reply_keys]
|
|
reply_keys.present? && reply_keys[[object.post_id, object.user_id]]
|
|
end
|
|
|
|
def reply_key
|
|
@options[:reply_keys][[object.post_id, object.user_id]].delete("-")
|
|
end
|
|
|
|
def has_bounce_key
|
|
object.bounce_key.present?
|
|
end
|
|
end
|