Merge branch 'main' into glitch-soc/merge-upstream
Conflicts: - `.github/dependabot.yml`: Upstream made changes while we have dropped this file. Keep the file deleted. - `.prettierignore`: Upstream made changes at the end of the file, where we had our extra lines. Just moved our extra lines back at the end. - `app/serializers/initial_state_serializer.rb`: Upstream code style changes. Applied them. - `app/services/backup_service.rb`: Upstream code style changes. Applied them.
This commit is contained in:
@ -16,6 +16,8 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
||||
attribute :silenced, key: :limited, if: :silenced?
|
||||
attribute :noindex, if: :local?
|
||||
|
||||
attribute :memorial, if: :memorial?
|
||||
|
||||
class AccountDecorator < SimpleDelegator
|
||||
def self.model_name
|
||||
Account.model_name
|
||||
@ -128,6 +130,10 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
||||
object.silenced?
|
||||
end
|
||||
|
||||
def memorial
|
||||
object.memorial?
|
||||
end
|
||||
|
||||
def roles
|
||||
if object.suspended? || object.user.nil?
|
||||
[]
|
||||
@ -140,7 +146,7 @@ class REST::AccountSerializer < ActiveModel::Serializer
|
||||
object.user_prefers_noindex?
|
||||
end
|
||||
|
||||
delegate :suspended?, :silenced?, :local?, to: :object
|
||||
delegate :suspended?, :silenced?, :local?, :memorial?, to: :object
|
||||
|
||||
def moved_and_not_nested?
|
||||
object.moved?
|
||||
|
@ -96,9 +96,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
|
||||
end
|
||||
|
||||
def registrations_message
|
||||
if Setting.closed_registrations_message.present?
|
||||
markdown.render(Setting.closed_registrations_message)
|
||||
end
|
||||
markdown.render(Setting.closed_registrations_message) if Setting.closed_registrations_message.present?
|
||||
end
|
||||
|
||||
def markdown
|
||||
|
Reference in New Issue
Block a user