From cb447b28c403c7db32e3e3d7c2510004287edfda Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 30 Aug 2019 00:14:36 +0200 Subject: Add profile directory to web UI (#11688) * Add profile directory to web UI * Add a line of bio to the directory --- app/services/activitypub/process_account_service.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/services') diff --git a/app/services/activitypub/process_account_service.rb b/app/services/activitypub/process_account_service.rb index 603e27ed9..cef658e19 100644 --- a/app/services/activitypub/process_account_service.rb +++ b/app/services/activitypub/process_account_service.rb @@ -83,6 +83,7 @@ class ActivityPub::ProcessAccountService < BaseService @account.fields = property_values || {} @account.also_known_as = as_array(@json['alsoKnownAs'] || []).map { |item| value_or_id(item) } @account.actor_type = actor_type + @account.discoverable = @json['discoverable'] || false end def set_fetchable_attributes! -- cgit From 3619e904da5b22017776abc2f1452f1535205d11 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sat, 31 Aug 2019 13:09:21 +0200 Subject: Fix auto-added media icons when a CW is set but no content text --- app/services/post_status_service.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/services') diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index b36471339..5d17f111b 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -49,7 +49,13 @@ class PostStatusService < BaseService def preprocess_attributes! if @text.blank? && @options[:spoiler_text].present? @text = '.' - @text = @media.find(&:video?) ? '📹' : '🖼' if @media.size > 0 + if @media.find(&:video?) || @media.find(&:gifv?) + @text = '📹' + elsif @media.find(&:audio?) + @text = '🎵' + elsif @media.find(&:image?) + @text = '🖼' + end end @visibility = @options[:visibility] || @account.user&.setting_default_privacy @visibility = :unlisted if @visibility == :public && @account.silenced? -- cgit