about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
authorbeatrix <beatrix.bitrot@gmail.com>2017-10-09 09:56:17 -0400
committerGitHub <noreply@github.com>2017-10-09 09:56:17 -0400
commitf0a2a6c875e9294f0ea1d4c6bc90529e41a2dc37 (patch)
treebe9174c3c262f38376b7c49b26495bd17e19e61b /app/models/status.rb
parent92a3181dc685aa4b3736b56f8a5d1c4d85b99544 (diff)
try to tighten up local only toot stuff, like... properly (#163)
* try to tighten up local only toot stuff, like... properly

* try to un-break tests
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index ea4c097bf..e1697b8af 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -257,6 +257,11 @@ class Status < ApplicationRecord
     end
   end
 
+  def local_only?
+    # match both with and without U+FE0F (the emoji variation selector)
+    /👁\ufe0f?\z/.match?(content)
+  end
+
   private
 
   def store_uri