summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Felder <feld@feld.me>2024-01-30 14:19:54 -0500
committerMark Felder <feld@feld.me>2024-01-30 14:19:54 -0500
commit88a35b2865103a0147669bcfe237f8e1bc8d0ec6 (patch)
tree5f56460c77ad1f0a5b37d6db53c8ab8c0b1d6971
parent674ae51d6a25e9b094c72250aa9b138e6ef6ce8d (diff)
downloadpleroma-88a35b2865103a0147669bcfe237f8e1bc8d0ec6.tar.gz
pleroma-88a35b2865103a0147669bcfe237f8e1bc8d0ec6.zip
Revert "Pleroma.Web.TwitterAPI.UtilController: dialyzer fixes"
This reverts commit 17f4251b19846401ca36ee31156294ec63de84ee.
-rw-r--r--lib/pleroma/web/api_spec/operations/twitter_util_operation.ex6
-rw-r--r--lib/pleroma/web/twitter_api/controllers/util_controller.ex5
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex b/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex
index 02b54d61a..724d873c0 100644
--- a/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex
+++ b/lib/pleroma/web/api_spec/operations/twitter_util_operation.ex
@@ -404,10 +404,10 @@ defmodule Pleroma.Web.ApiSpec.TwitterUtilOperation do
title: "RemoteInteractionRequest",
description: "POST body for remote interaction",
type: :object,
- required: ["ap_id", "profile"],
+ required: [:ap_id, :profile],
properties: %{
- "ap_id" => %Schema{type: :string, description: "Profile or status ActivityPub ID"},
- "profile" => %Schema{type: :string, description: "Remote profile webfinger"}
+ ap_id: %Schema{type: :string, description: "Profile or status ActivityPub ID"},
+ profile: %Schema{type: :string, description: "Remote profile webfinger"}
}
}
end
diff --git a/lib/pleroma/web/twitter_api/controllers/util_controller.ex b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
index a74c806a6..c8ecf5eff 100644
--- a/lib/pleroma/web/twitter_api/controllers/util_controller.ex
+++ b/lib/pleroma/web/twitter_api/controllers/util_controller.ex
@@ -150,10 +150,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
end
end
- def remote_interaction(
- %{body_params: %{"ap_id" => ap_id, "profile" => profile}} = conn,
- _params
- ) do
+ def remote_interaction(%{body_params: %{ap_id: ap_id, profile: profile}} = conn, _params) do
with {:ok, %{"subscribe_address" => template}} <- WebFinger.finger(profile) do
conn
|> json(%{url: String.replace(template, "{uri}", ap_id)})