diff options
author | multiple creatures <dev@multiple-creature.party> | 2020-02-16 03:39:53 -0600 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2020-02-16 03:39:53 -0600 |
commit | 8e307ca94dfa2281013fc29dd5e0812afaf721d0 (patch) | |
tree | 58f57dca36befaa67728719cfc8e46cf1e6478c6 /app/models | |
parent | 69bcd23c89d5d4dc35d6a0a52da2ac3ac4c2d500 (diff) |
add `keep_hidden?` flag to make sure drafts are not accidentally published by the delayed roars feature
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/status.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index a1dc37fe8..36efaf765 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -328,6 +328,18 @@ class Status < ApplicationRecord @no_clobber_expirations || false end + def keep_hidden! + @keep_hidden = true + end + + def keep_unhidden! + @keep_hidden = false + end + + def keep_hidden? + @keep_hidden || false + end + def mark_for_mass_destruction! @marked_for_mass_destruction = true end |