about summary refs log tree commit diff
path: root/app/models/status.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/status.rb')
-rw-r--r--app/models/status.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb
index b426f9d5b..5716b93d4 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -351,6 +351,14 @@ class Status < ApplicationRecord
     super || build_status_stat
   end
 
+  def has_non_mention_links?
+    if local?
+      text.match? %r{https?://\w}
+    else
+      Nokogiri::HTML.fragment(text).css('a:not(.mention)').present?
+    end
+  end
+
   private
 
   def update_status_stat!(attrs)