mirror of
https://github.com/discourse/discourse.git
synced 2024-12-12 19:33:43 +08:00
d10694150e
This reverts commit e9b2018bc8
.
18 lines
431 B
Ruby
18 lines
431 B
Ruby
class EmailLogSerializer < ApplicationSerializer
|
|
include EmailLogsMixin
|
|
|
|
attributes :reply_key,
|
|
:bounced
|
|
|
|
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
|
|
end
|