mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Allow clicks on @names
This commit is contained in:
parent
0320a5ae64
commit
3a861c0823
1 changed files with 6 additions and 1 deletions
|
@ -19,7 +19,12 @@ class TopicLinkClick < ActiveRecord::Base
|
||||||
link = link.where(topic_id: args[:topic_id]) if args[:topic_id].present?
|
link = link.where(topic_id: args[:topic_id]) if args[:topic_id].present?
|
||||||
link = link.first
|
link = link.first
|
||||||
|
|
||||||
return unless link.present?
|
# If no link is found, return the url for relative links
|
||||||
|
unless link.present?
|
||||||
|
return args[:url] if args[:url] =~ /^\//
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
return args[:url] if (args[:user_id] && (link.user_id == args[:user_id]))
|
return args[:url] if (args[:user_id] && (link.user_id == args[:user_id]))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue