]> cat aescling's git repositories - mastodon.git/commitdiff
Add author/actor URI to the list of webfinger aliases (#2319)
authorThibG <thib@sitedethib.com>
Sat, 22 Apr 2017 13:09:49 +0000 (15:09 +0200)
committerEugen <eugen@zeonfederated.com>
Sat, 22 Apr 2017 13:09:49 +0000 (15:09 +0200)
This fixes outbound salmon requests to remote GNU Social instances

app/views/well_known/webfinger/show.json.rabl
app/views/well_known/webfinger/show.xml.ruby

index e637ed9d329b2245f6237ae322f12b407adef00d..67874da78197636c0d65a807277c711948053756 100644 (file)
@@ -3,7 +3,7 @@ object @account
 node(:subject) { @canonical_account_uri }
 
 node(:aliases) do
-  [TagManager.instance.url_for(@account)]
+  [TagManager.instance.url_for(@account), TagManager.instance.uri_for(@account)]
 end
 
 node(:links) do
index 80ac71d2708741b47c58b5fce70501ee676a2d1c..fc0ab5b84d11046c4a75abe019a6caada98623fc 100644 (file)
@@ -2,6 +2,7 @@ Nokogiri::XML::Builder.new do |xml|
   xml.XRD(xmlns: 'http://docs.oasis-open.org/ns/xri/xrd-1.0') do
     xml.Subject @canonical_account_uri
     xml.Alias TagManager.instance.url_for(@account)
+    xml.Alias TagManager.instance.uri_for(@account)
     xml.Link(rel: 'http://webfinger.net/rel/profile-page', type: 'text/html', href: TagManager.instance.url_for(@account))
     xml.Link(rel: 'http://schemas.google.com/g/2010#updates-from', type: 'application/atom+xml', href: account_url(@account, format: 'atom'))
     xml.Link(rel: 'salmon', href: api_salmon_url(@account.id))