mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 00:26:30 +00:00
Only handle subscription requests for now.
This commit is contained in:
parent
8fb73c28bb
commit
c585f9e26c
3 changed files with 4 additions and 4 deletions
|
@ -52,7 +52,7 @@ defmodule Pleroma.Web.Websub do
|
|||
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"],
|
||||
|
|
|
@ -9,7 +9,7 @@ defmodule Pleroma.Web.Websub.WebsubControllerTest do
|
|||
|
||||
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"
|
||||
|
|
|
@ -52,7 +52,7 @@ defmodule Pleroma.Web.WebsubTest do
|
|||
|
||||
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"
|
||||
|
@ -72,7 +72,7 @@ defmodule Pleroma.Web.WebsubTest do
|
|||
|
||||
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"
|
||||
|
|
Loading…
Reference in a new issue