Updated LinkBlock checks for if status text contains blocked domain
• Updated: - LinkBlock checks for if status text contains blocked domain - normalize_link to use domain instead of normalized_host • Added: - normalize_link_domain to check for if entire domains are blocked or not for spam
This commit is contained in:
@@ -25,7 +25,13 @@ class TagManager
|
||||
def normalize_link(link)
|
||||
return if link.nil?
|
||||
uri = Addressable::URI.parse(link)
|
||||
return "#{uri.normalized_host}#{uri.normalized_path}".strip
|
||||
return "#{uri.domain}#{uri.normalized_path}".strip
|
||||
end
|
||||
|
||||
def normalize_link_domain(link)
|
||||
return if link.nil?
|
||||
uri = Addressable::URI.parse(link)
|
||||
return "#{uri.domain}".strip
|
||||
end
|
||||
|
||||
def same_acct?(canonical, needle)
|
||||
|
||||
Reference in New Issue
Block a user