about summary refs log tree commit diff
path: root/app/helpers
diff options
context:
space:
mode:
authorpluralcafe-docker <docker@plural.cafe>2018-08-23 06:16:14 +0000
committerpluralcafe-docker <docker@plural.cafe>2018-08-23 06:16:14 +0000
commit0fa521de89168ef33423fc7306a33d4a1c3badf3 (patch)
treece3663d75ca93ea2d32e10de532eb18a230cf6e0 /app/helpers
parenta4935a8e24dcfa865fb330693d8ec90beca1aa98 (diff)
parent8aa58e34bb2b62192a997ac7ea8919b22fc45f80 (diff)
Merge branch 'glitch'
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/admin/action_logs_helper.rb2
-rw-r--r--app/helpers/jsonld_helper.rb6
2 files changed, 5 insertions, 3 deletions
diff --git a/app/helpers/admin/action_logs_helper.rb b/app/helpers/admin/action_logs_helper.rb
index 85bd30304..c28f0be6b 100644
--- a/app/helpers/admin/action_logs_helper.rb
+++ b/app/helpers/admin/action_logs_helper.rb
@@ -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
diff --git a/app/helpers/jsonld_helper.rb b/app/helpers/jsonld_helper.rb
index 9d2b6cf00..532397272 100644
--- a/app/helpers/jsonld_helper.rb
+++ b/app/helpers/jsonld_helper.rb
@@ -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