diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-08-03 21:57:22 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-08-03 21:57:56 -0500 |
commit | 0a646efd48d48836261ab553e47d2a46dde28a98 (patch) | |
tree | 7762a190787b5d346e55aea33bb83b5d6250dc30 /app | |
parent | d69ee097dd07ff7f2ec7f9ad0b235ee993d42881 (diff) |
make sure only thread authors and admins can close threads
Diffstat (limited to 'app')
-rw-r--r-- | app/lib/bangtags.rb | 1 |
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}") |