Merge branch 'master' into glitch-soc/merge-upstream

This commit is contained in:
Thibaut Girka
2018-08-22 20:56:32 +02:00
103 changed files with 757 additions and 167 deletions

View File

@ -33,7 +33,7 @@ module Admin::ActionLogsHelper
when 'DomainBlock', 'EmailDomainBlock'
link_to attributes['domain'], "https://#{attributes['domain']}"
when 'Status'
tmp_status = Status.new(attributes)
tmp_status = Status.new(attributes.except('reblogs_count', 'favourites_count'))
if tmp_status.account
link_to tmp_status.account&.acct || "##{tmp_status.account_id}", admin_account_path(tmp_status.account_id)
else

View File

@ -73,8 +73,10 @@ module JsonLdHelper
end
end
def body_to_json(body)
body.is_a?(String) ? Oj.load(body, mode: :strict) : body
def body_to_json(body, compare_id: nil)
json = body.is_a?(String) ? Oj.load(body, mode: :strict) : body
return if compare_id.present? && json['id'] != compare_id
json
rescue Oj::ParseError
nil
end