re-cache post when changed by `visibility:parent` or `parent:tag`/`parent:untag` bangtags

staging
multiple creatures 2019-07-20 06:47:26 -05:00
parent 74e81d4ef7
commit c864465e71
1 changed files with 2 additions and 0 deletions

View File

@ -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