end)
end
- def incoming_subscription_request(user, params) do
+ def incoming_subscription_request(user, %{"hub.mode" => "subscribe"} = params) do
with {:ok, topic} <- valid_topic(params, user),
{:ok, lease_time} <- lease_time(params),
secret <- params["hub.secret"],
data = %{
"hub.callback": "http://example.org/sub",
- "hub.mode": "subscription",
+ "hub.mode": "subscribe",
"hub.topic": Pleroma.Web.OStatus.feed_path(user),
"hub.secret": "a random secret",
"hub.lease_seconds": "100"
data = %{
"hub.callback" => "http://example.org/sub",
- "hub.mode" => "subscription",
+ "hub.mode" => "subscribe",
"hub.topic" => Pleroma.Web.OStatus.feed_path(user),
"hub.secret" => "a random secret",
"hub.lease_seconds" => "100"
data = %{
"hub.callback" => sub.callback,
- "hub.mode" => "subscription",
+ "hub.mode" => "subscribe",
"hub.topic" => Pleroma.Web.OStatus.feed_path(user),
"hub.secret" => "a random secret",
"hub.lease_seconds" => "100"