mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-12-20 20:27:07 +00:00
Use summary as summary for converted ActivityPub objects (#9823)
Fix #8609
This commit is contained in:
parent
59e3a7f87b
commit
4ab42287c0
|
@ -61,7 +61,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
account: @account,
|
account: @account,
|
||||||
text: text_from_content || '',
|
text: text_from_content || '',
|
||||||
language: detected_language,
|
language: detected_language,
|
||||||
spoiler_text: text_from_summary || '',
|
spoiler_text: converted_object_type? ? '' : (text_from_summary || ''),
|
||||||
created_at: @object['published'],
|
created_at: @object['published'],
|
||||||
override_timestamps: @options[:override_timestamps],
|
override_timestamps: @options[:override_timestamps],
|
||||||
reply: @object['inReplyTo'].present?,
|
reply: @object['inReplyTo'].present?,
|
||||||
|
@ -256,7 +256,7 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
|
||||||
end
|
end
|
||||||
|
|
||||||
def text_from_content
|
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?
|
if @object['content'].present?
|
||||||
@object['content']
|
@object['content']
|
||||||
|
|
Loading…
Reference in a new issue