diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-16 18:36:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-16 18:36:17 +0100 |
commit | 4ab42287c0bbcbd259bff229d66da8964a261aff (patch) | |
tree | 37786160183560586383bde841bb7e6ed7de7038 /app/lib/activitypub/activity | |
parent | 59e3a7f87bd7d855774ef8caa1a7d795059251fc (diff) |
Use summary as summary for converted ActivityPub objects (#9823)
Fix #8609
Diffstat (limited to 'app/lib/activitypub/activity')
-rw-r--r-- | app/lib/activitypub/activity/create.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb index f4cf7ceb5..665a9fbdc 100644 --- a/app/lib/activitypub/activity/create.rb +++ b/app/lib/activitypub/activity/create.rb @@ -61,7 +61,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity account: @account, text: text_from_content || '', language: detected_language, - spoiler_text: text_from_summary || '', + spoiler_text: converted_object_type? ? '' : (text_from_summary || ''), created_at: @object['published'], override_timestamps: @options[:override_timestamps], reply: @object['inReplyTo'].present?, @@ -256,7 +256,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity end def text_from_content - return Formatter.instance.linkify([text_from_name, object_url || @object['id']].join(' ')) if converted_object_type? + return Formatter.instance.linkify([[text_from_name, text_from_summary.presence].compact.join("\n\n"), object_url || @object['id']].join(' ')) if converted_object_type? if @object['content'].present? @object['content'] |