diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-03-15 07:51:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-15 07:51:55 +0100 |
commit | a7941176791ec8ad56e45efbb449b9d09a580a6b (patch) | |
tree | d2a8b6b7eb12be7e5a7e7fad67693f1f5d796039 /app/models | |
parent | 40a4dad4c8e63430a8027ab2ed3aca5526b0508a (diff) |
Fix individually approved/rejected statuses/links showing as pending review (#17787)
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/preview_card.rb | 4 | ||||
-rw-r--r-- | app/models/status.rb | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/app/models/preview_card.rb b/app/models/preview_card.rb index 0f9e23fa1..0d2c32c35 100644 --- a/app/models/preview_card.rb +++ b/app/models/preview_card.rb @@ -80,6 +80,10 @@ class PreviewCard < ApplicationRecord end end + def requires_review? + attributes['trendable'].nil? && (provider.nil? || provider.requires_review?) + end + def requires_review_notification? attributes['trendable'].nil? && (provider.nil? || provider.requires_review_notification?) end diff --git a/app/models/status.rb b/app/models/status.rb index f2c55090b..5b984543e 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -294,6 +294,10 @@ class Status < ApplicationRecord end end + def requires_review? + attributes['trendable'].nil? && account.requires_review? + end + def requires_review_notification? attributes['trendable'].nil? && account.requires_review_notification? end |