]> cat aescling's git repositories - mastodon.git/commitdiff
Allow webfinger controller to reply to user@WEB_DOMAIN in addition to user@LOCAL_DOMA...
authorThibG <thib@sitedethib.com>
Sun, 23 Apr 2017 12:19:54 +0000 (14:19 +0200)
committerEugen <eugen@zeonfederated.com>
Sun, 23 Apr 2017 12:19:54 +0000 (14:19 +0200)
This provides a hotfix for outbound salmon requests to other Mastodon instances
as they currently will try to resovle user@WEB_DOMAIN instead of user@LOCAL_DOMAIN
(see #2012 and #20312).

Furthermore, this should ease transition from users switching from
LOCAL_DOMAIN = WEB_DOMAIN to another LOCAL_DOMAIN when WEB_DOMAIN does not change.

app/lib/webfinger_resource.rb

index 8c5db795d292231885a3f2afaca1de30ffdcab52..a54a702a2e9c5a66b6515701039f77a4e7668d63 100644 (file)
@@ -61,6 +61,6 @@ class WebfingerResource
   end
 
   def domain_matches_local?
-    TagManager.instance.local_domain?(local_domain)
+    TagManager.instance.local_domain?(local_domain) || TagManager.instance.web_domain?(local_domain)
   end
 end