about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-07-09 03:27:35 +0200
committerGitHub <noreply@github.com>2019-07-09 03:27:35 +0200
commit4e921832272425352d28cad550bfc4dffd6d0e78 (patch)
treec315a0b9dda8b69b6512c79711e896a18756f701 /app/lib
parent1e7187f2a8e0b9ffe4e7d6b06e9f70674c50471e (diff)
Refactor domain block checks (#11268)
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/tag_manager.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb
index daf4f556b..c88cf4994 100644
--- a/app/lib/tag_manager.rb
+++ b/app/lib/tag_manager.rb
@@ -24,13 +24,16 @@ class TagManager
 
   def same_acct?(canonical, needle)
     return true if canonical.casecmp(needle).zero?
+
     username, domain = needle.split('@')
+
     local_domain?(domain) && canonical.casecmp(username).zero?
   end
 
   def local_url?(url)
     uri    = Addressable::URI.parse(url).normalize
     domain = uri.host + (uri.port ? ":#{uri.port}" : '')
+
     TagManager.instance.web_domain?(domain)
   end
 end