aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authoreal <eal@waifu.club>2018-01-18 18:42:32 +0200
committereal <eal@waifu.club>2018-01-18 18:42:32 +0200
commit57d413e65541f47a3c303be88c0ac6d4bfed33a9 (patch)
tree8e4efa9fd90873d65925ee687076b2180468389f /lib
parentb259b4e4d1dc27528b99744fffabfb05c676ec3f (diff)
downloadpleroma-57d413e65541f47a3c303be88c0ac6d4bfed33a9.tar.gz
Revert "Revert "Add remote follow path to webfinger.""
This reverts commit fb5aa34092cf8aa04b3b7001e81cf1585ee0041a.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/ostatus/ostatus.ex4
-rw-r--r--lib/pleroma/web/web_finger/web_finger.ex3
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/pleroma/web/ostatus/ostatus.ex b/lib/pleroma/web/ostatus/ostatus.ex
index 745539b3e..e65cab3ed 100644
--- a/lib/pleroma/web/ostatus/ostatus.ex
+++ b/lib/pleroma/web/ostatus/ostatus.ex
@@ -22,6 +22,10 @@ defmodule Pleroma.Web.OStatus do
"#{user.ap_id}/salmon"
end
+ def remote_follow_path do
+ "#{Web.base_url}/ostatus_subscribe?acct={uri}"
+ end
+
def handle_incoming(xml_string) do
with doc when doc != :error <- parse_document(xml_string) do
entries = :xmerl_xpath.string('//entry', doc)
diff --git a/lib/pleroma/web/web_finger/web_finger.ex b/lib/pleroma/web/web_finger/web_finger.ex
index 026d2f98b..4ae3eab59 100644
--- a/lib/pleroma/web/web_finger/web_finger.ex
+++ b/lib/pleroma/web/web_finger/web_finger.ex
@@ -44,7 +44,8 @@ defmodule Pleroma.Web.WebFinger do
{:Link, %{rel: "http://schemas.google.com/g/2010#updates-from", type: "application/atom+xml", href: OStatus.feed_path(user)}},
{:Link, %{rel: "http://webfinger.net/rel/profile-page", type: "text/html", href: user.ap_id}},
{:Link, %{rel: "salmon", href: OStatus.salmon_path(user)}},
- {:Link, %{rel: "magic-public-key", href: "data:application/magic-public-key,#{magic_key}"}}
+ {:Link, %{rel: "magic-public-key", href: "data:application/magic-public-key,#{magic_key}"}},
+ {:Link, %{rel: "http://ostatus.org/schema/1.0/subscribe", template: OStatus.remote_follow_path()}}
]
}
|> XmlBuilder.to_doc