summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-rw-r--r--users/app/views/webfinger/search.xml.erb3
-rw-r--r--users/lib/webfinger/user_presenter.rb5
-rw-r--r--users/test/unit/webfinger/user_presenter_test.rb2
3 files changed, 1 insertions, 9 deletions
diff --git a/users/app/views/webfinger/search.xml.erb b/users/app/views/webfinger/search.xml.erb
index 27f26d1..7328552 100644
--- a/users/app/views/webfinger/search.xml.erb
+++ b/users/app/views/webfinger/search.xml.erb
@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Subject><%= @presenter.subject %></Subject>
- <%- @presenter.aliases.each do |user_alias| %>
- <Alias>"<%= user_alias %>"</Alias>
- <% end %>
<%- @presenter.links.each do |rel, link| %>
<Link rel=<%=rel%> type=<%=link[:type]%> href="<%= link[:key] %>"/>
<% end %>
diff --git a/users/lib/webfinger/user_presenter.rb b/users/lib/webfinger/user_presenter.rb
index 41153a8..329f477 100644
--- a/users/lib/webfinger/user_presenter.rb
+++ b/users/lib/webfinger/user_presenter.rb
@@ -10,7 +10,6 @@ class Webfinger::UserPresenter
def to_json(options = {})
{
subject: subject,
- aliases: aliases,
links: links
}.to_json(options)
end
@@ -19,10 +18,6 @@ class Webfinger::UserPresenter
"acct:#{@user.email_address}"
end
- def aliases
- [ user_url(@user, :host => @request.host) ]
- end
-
def links
links = {}
links[:public_key] = { type: 'PGP', href: key } if key
diff --git a/users/test/unit/webfinger/user_presenter_test.rb b/users/test/unit/webfinger/user_presenter_test.rb
index 7f7a0d4..04aeb22 100644
--- a/users/test/unit/webfinger/user_presenter_test.rb
+++ b/users/test/unit/webfinger/user_presenter_test.rb
@@ -39,7 +39,7 @@ class Webfinger::UserPresenterTest < ActiveSupport::TestCase
@user.stubs :public_key => "here's a key"
presenter = Webfinger::UserPresenter.new(@user, @request)
hash = JSON.parse presenter.to_json
- assert_equal ["subject", "links", "aliases"].sort, hash.keys.sort
+ assert_equal ["subject", "links"].sort, hash.keys.sort
hash.each do |key, value|
assert_equal presenter.send(key.to_sym).to_json, value.to_json
end