about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-07-20 06:47:26 -0500
committermultiple creatures <dev@multiple-creature.party>2019-07-20 06:47:26 -0500
commitc864465e71b8d971283c055cfc84ea93aeb35d90 (patch)
treec27debc238fdf03ac89be75c8babe7832ce9f9dd /app
parent74e81d4ef75fa95ad2665f619384fbd49f8ce759 (diff)
re-cache post when changed by `visibility:parent` or `parent:tag`/`parent:untag` bangtags
Diffstat (limited to 'app')
-rw-r--r--app/lib/bangtags.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index 168cc2ccc..d79c6a8b5 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -303,6 +303,7 @@ class Bangtags
             else
               del_tags(@parent_status, *tags)
             end
+            Rails.cache.delete("statuses/#{@parent_status.id}")
           when 'emoji'
             @parent_status.emojis.each do |theirs|
               ours = CustomEmoji.find_or_initialize_by(shortcode: theirs.shortcode, domain: nil)
@@ -507,6 +508,7 @@ class Bangtags
             @parent_status.visibility = v
             @parent_status.local_only = false if cmd[3].downcase.in? %w(federate f public p world)
             @parent_status.save
+            Rails.cache.delete("statuses/#{@parent_status.id}")
             DistributionWorker.perform_async(@parent_status.id)
             ActivityPub::DistributionWorker.perform_async(@parent_status) unless @parent_status.local_only?
           else