Add link_preview setting
This commit is contained in:
parent
621a41b670
commit
bd87415996
7 changed files with 19 additions and 1 deletions
|
@ -323,6 +323,13 @@ class Account < ApplicationRecord
|
|||
user&.setting_translatable_private || (settings.present? && settings['translatable_private']) || false
|
||||
end
|
||||
|
||||
def link_preview?
|
||||
return user.setting_link_preview if local? && user.present?
|
||||
return settings['link_preview'] if settings.present? && settings.key?('link_preview')
|
||||
|
||||
true
|
||||
end
|
||||
|
||||
def public_statuses_count
|
||||
hide_statuses_count? ? 0 : statuses_count
|
||||
end
|
||||
|
@ -389,6 +396,7 @@ class Account < ApplicationRecord
|
|||
'hide_following_count' => hide_following_count?,
|
||||
'hide_followers_count' => hide_followers_count?,
|
||||
'translatable_private' => translatable_private?,
|
||||
'link_preview' => link_preview?,
|
||||
}
|
||||
if Setting.enable_block_emoji_reaction_settings
|
||||
config = config.merge({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue