mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
UX: Hide link to incoming email when there is no bounce key
For example, webhooks mark email log entries as bounced without there ever being an incoming email.
This commit is contained in:
@@ -2,7 +2,8 @@ class EmailLogSerializer < ApplicationSerializer
|
||||
include EmailLogsMixin
|
||||
|
||||
attributes :reply_key,
|
||||
:bounced
|
||||
:bounced,
|
||||
:has_bounce_key
|
||||
|
||||
has_one :user, serializer: BasicUserSerializer, embed: :objects
|
||||
|
||||
@@ -14,4 +15,8 @@ class EmailLogSerializer < ApplicationSerializer
|
||||
def reply_key
|
||||
@options[:reply_keys][[object.post_id, object.user_id]].delete("-")
|
||||
end
|
||||
|
||||
def has_bounce_key
|
||||
object.bounce_key.present?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user