Skip to content

Commit

Permalink
add subscribe url to webfinger
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperTux88 authored and denschub committed Dec 30, 2015
1 parent 0e7bb6d commit 9f8e018
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
19 changes: 10 additions & 9 deletions config/initializers/diaspora_federation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,16 @@
person = Person.find_local_by_diaspora_handle(handle)
if person
DiasporaFederation::Discovery::WebFinger.new(
acct_uri: "acct:#{person.diaspora_handle}",
alias_url: AppConfig.url_to("/people/#{person.guid}"),
hcard_url: AppConfig.url_to(DiasporaFederation::Engine.routes.url_helpers.hcard_path(person.guid)),
seed_url: AppConfig.pod_uri,
profile_url: person.profile_url,
atom_url: person.atom_url,
salmon_url: person.receive_url,
guid: person.guid,
public_key: person.serialized_public_key
acct_uri: "acct:#{person.diaspora_handle}",
alias_url: AppConfig.url_to("/people/#{person.guid}"),
hcard_url: AppConfig.url_to(DiasporaFederation::Engine.routes.url_helpers.hcard_path(person.guid)),
seed_url: AppConfig.pod_uri,
profile_url: person.profile_url,
atom_url: person.atom_url,
salmon_url: person.receive_url,
subscribe_url: AppConfig.url_to("/people?q={uri}"),
guid: person.guid,
public_key: person.serialized_public_key
)
end
end
Expand Down
1 change: 1 addition & 0 deletions spec/federation_callbacks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
expect(wf.profile_url).to eq(person.profile_url)
expect(wf.atom_url).to eq(person.atom_url)
expect(wf.salmon_url).to eq(person.receive_url)
expect(wf.subscribe_url).to eq(AppConfig.url_to("/people?q={uri}"))
expect(wf.guid).to eq(person.guid)
expect(wf.public_key).to eq(person.serialized_public_key)
end
Expand Down

0 comments on commit 9f8e018

Please sign in to comment.