about summary refs log tree commit diff
path: root/app/lib
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2017-09-13 14:22:16 +0200
committerEugen Rochko <eugen@zeonfederated.com>2017-09-13 14:22:16 +0200
commit550ff677daef92886ab7440ad262821f4c732e85 (patch)
treeed8f222c1688092e9e819697d348f191776d336b /app/lib
parentda77f65c4684a8a9ee25c3e18f6f09824c765c2d (diff)
Fix ActivityPub handling of replies with WEB_DOMAIN (#4895) (#4904)
* Fix ActivityPub handling of replies when LOCAL_DOMAIN ≠ WEB_DOMAIN (#4895)

For all intents and purposes, `local_url?` is used to check if an URL refers
to the Web UI or the various API endpoints of the local instances. Those things
reside on `WEB_DOMAIN` and not `LOCAL_DOMAIN`.

* Change local_url? spec, as all URLs handled by Mastodon are based on WEB_DOMAIN
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/tag_manager.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/tag_manager.rb b/app/lib/tag_manager.rb
index f33a20c6f..1d0a24e42 100644
--- a/app/lib/tag_manager.rb
+++ b/app/lib/tag_manager.rb
@@ -87,7 +87,7 @@ class TagManager
   def local_url?(url)
     uri    = Addressable::URI.parse(url).normalize
     domain = uri.host + (uri.port ? ":#{uri.port}" : '')
-    TagManager.instance.local_domain?(domain)
+    TagManager.instance.web_domain?(domain)
   end
 
   def uri_for(target)