mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 13:35:20 -05:00
Don't track links within discourse unless they're to other topics.
This commit is contained in:
@@ -49,6 +49,9 @@ class TopicLink < ActiveRecord::Base
|
||||
route = Rails.application.routes.recognize_path(parsed.path)
|
||||
topic_id = route[:topic_id]
|
||||
post_number = route[:post_number] || 1
|
||||
|
||||
# We aren't interested in tracking internal links to non-topics
|
||||
next unless topic_id
|
||||
end
|
||||
|
||||
# Skip linking to ourselves
|
||||
|
||||
Reference in New Issue
Block a user