about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-08-03 21:57:22 -0500
committermultiple creatures <dev@multiple-creature.party>2019-08-03 21:57:56 -0500
commit0a646efd48d48836261ab553e47d2a46dde28a98 (patch)
tree7762a190787b5d346e55aea33bb83b5d6250dc30 /app
parentd69ee097dd07ff7f2ec7f9ad0b235ee993d42881 (diff)
make sure only thread authors and admins can close threads
Diffstat (limited to 'app')
-rw-r--r--app/lib/bangtags.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/lib/bangtags.rb b/app/lib/bangtags.rb
index b9427a1f6..421c142ef 100644
--- a/app/lib/bangtags.rb
+++ b/app/lib/bangtags.rb
@@ -376,6 +376,7 @@ class Bangtags
             plain.gsub!(/ dot /i, '.')
             chunk = plain.scan(/[\w\-]+\.[\w\-]+(?:\.[\w\-]+)*/).uniq.join(' ')
           when 'noreplies', 'noats', 'close'
+            next unless @parent_status.account.id == @account.id || @account.user.admin?
             @parent_status.reject_replies = true
             @parent_status.save
             Rails.cache.delete("statuses/#{@parent_status.id}")