From 46522d8c1bfdd4c0d7eae708b0e31dd37848f097 Mon Sep 17 00:00:00 2001 From: multiple creatures Date: Mon, 6 May 2019 03:46:15 -0500 Subject: Do not process mentions or bangtags in drafts. Add `draft?` method to `Status` model. --- app/models/status.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/models') 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 -- cgit