diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-05-14 20:51:50 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-05-14 20:51:50 +0200 |
commit | ba7ee67498905cbc96d531d45a80e284880e09ee (patch) | |
tree | 755476fb27484fb36bd01578f8f22d4dd8d64562 /app/services | |
parent | 46659655439e7d76726aa38ed5d599a795b3790f (diff) | |
parent | 03b69ebc450efc07246bd64204276941b7ede3fc (diff) |
Merge branch 'master' into glitch-soc/merge
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/activitypub/fetch_remote_status_service.rb | 4 | ||||
-rw-r--r-- | app/services/post_status_service.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/services/activitypub/fetch_remote_status_service.rb b/app/services/activitypub/fetch_remote_status_service.rb index b6c00a9e7..2b447abb3 100644 --- a/app/services/activitypub/fetch_remote_status_service.rb +++ b/app/services/activitypub/fetch_remote_status_service.rb @@ -4,9 +4,9 @@ class ActivityPub::FetchRemoteStatusService < BaseService include JsonLdHelper # Should be called when uri has already been checked for locality - def call(uri, id: true, prefetched_body: nil) + def call(uri, id: true, prefetched_body: nil, on_behalf_of: nil) @json = if prefetched_body.nil? - fetch_resource(uri, id) + fetch_resource(uri, id, on_behalf_of) else body_to_json(prefetched_body) end diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 6eb233f9d..b1d5bd3a7 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -22,7 +22,7 @@ class PostStatusService < BaseService media = validate_media!(options[:media_ids]) status = nil text = options.delete(:spoiler_text) if text.blank? && options[:spoiler_text].present? - text = '.' if text.blank? && !media.empty? + text = '.' if text.blank? && media.present? ApplicationRecord.transaction do status = account.statuses.create!(text: text, |