make sure only thread authors and admins can close threads
parent
d69ee097dd
commit
0a646efd48
|
@ -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}")
|
||||
|
|
Loading…
Reference in New Issue