about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/status.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index b7bd5cc84..e6dd81cd4 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -39,6 +39,8 @@ class Status < ApplicationRecord
   include StatusThreadingConcern
 
   LOCAL_DOMAINS = ENV.fetch('LOCAL_DOMAINS', '').chomp.split(/\.?\s+/).freeze
+  # match both with and without U+FE0F (the emoji variation selector)
+  LOCAL_ONLY_TOKENS = /(?:#!|\u{1f441}\ufe0f?)\u200b?\z/
   FORCE_SENSITIVE = ENV.fetch('FORCE_SENSITIVE', '').chomp.split(/\.?\s+/).freeze
   FORCE_UNLISTED = ENV.fetch('FORCE_UNLISTED', '').chomp.split(/\.?\s+/).freeze
 
@@ -500,8 +502,7 @@ class Status < ApplicationRecord
   end
 
   def marked_local_only?
-    # match both with and without U+FE0F (the emoji variation selector)
-    /(?:#!|\u{1f441}\ufe0f?)\u200b?\z/.match?(content)
+    LOCAL_ONLY_TOKENS.match?(content)
   end
 
   def marked_no_replies?