diff options
author | multiple creatures <dev@multiple-creature.party> | 2019-05-06 03:46:15 -0500 |
---|---|---|
committer | multiple creatures <dev@multiple-creature.party> | 2019-05-21 03:16:22 -0500 |
commit | 46522d8c1bfdd4c0d7eae708b0e31dd37848f097 (patch) | |
tree | 586aed7bdd50346e7caf1e3e07224327cfda724c /app/models | |
parent | 3e8690f2c07cc433c37bbc66d07d1bd43225ee13 (diff) |
Do not process mentions or bangtags in drafts. Add `draft?` method to `Status` model.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/status.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index 0b3d3cb26..1141d3f4f 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -211,6 +211,10 @@ class Status < ApplicationRecord proper.text end + def draft? + local? && text.present? && text.include?('#!draft') + end + def target reblog end |