mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-12-23 08:36:29 +00:00
Revert "StatusController: Deactivate application support for now."
This reverts commit 024c11c18d
.
This commit is contained in:
parent
c5352e90be
commit
2e296c079f
2 changed files with 9 additions and 12 deletions
|
@ -21,7 +21,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
|
||||||
alias Pleroma.Web.CommonAPI
|
alias Pleroma.Web.CommonAPI
|
||||||
alias Pleroma.Web.MastodonAPI.AccountView
|
alias Pleroma.Web.MastodonAPI.AccountView
|
||||||
alias Pleroma.Web.MastodonAPI.ScheduledActivityView
|
alias Pleroma.Web.MastodonAPI.ScheduledActivityView
|
||||||
# alias Pleroma.Web.OAuth.Token
|
alias Pleroma.Web.OAuth.Token
|
||||||
alias Pleroma.Web.Plugs.OAuthScopesPlug
|
alias Pleroma.Web.Plugs.OAuthScopesPlug
|
||||||
alias Pleroma.Web.Plugs.RateLimiter
|
alias Pleroma.Web.Plugs.RateLimiter
|
||||||
|
|
||||||
|
@ -420,16 +420,14 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Deactivated for 2.3.0
|
defp put_application(params, %{assigns: %{token: %Token{user: %User{} = user} = token}} = _conn) do
|
||||||
# defp put_application(params,
|
if user.disclose_client do
|
||||||
# %{assigns: %{token: %Token{user: %User{} = user} = token}} = _conn) do
|
%{client_name: client_name, website: website} = Repo.preload(token, :app).app
|
||||||
# if user.disclose_client do
|
Map.put(params, :generator, %{type: "Application", name: client_name, url: website})
|
||||||
# %{client_name: client_name, website: website} = Repo.preload(token, :app).app
|
else
|
||||||
# Map.put(params, :generator, %{type: "Application", name: client_name, url: website})
|
Map.put(params, :generator, nil)
|
||||||
# else
|
end
|
||||||
# Map.put(params, :generator, nil)
|
end
|
||||||
# end
|
|
||||||
# end
|
|
||||||
|
|
||||||
defp put_application(params, _), do: Map.put(params, :generator, nil)
|
defp put_application(params, _), do: Map.put(params, :generator, nil)
|
||||||
end
|
end
|
||||||
|
|
|
@ -358,7 +358,6 @@ defmodule Pleroma.Web.MastodonAPI.StatusControllerTest do
|
||||||
assert activity.data["cc"] == []
|
assert activity.data["cc"] == []
|
||||||
end
|
end
|
||||||
|
|
||||||
@tag :skip
|
|
||||||
test "discloses application metadata when enabled" do
|
test "discloses application metadata when enabled" do
|
||||||
user = insert(:user, disclose_client: true)
|
user = insert(:user, disclose_client: true)
|
||||||
%{user: _user, token: token, conn: conn} = oauth_access(["write:statuses"], user: user)
|
%{user: _user, token: token, conn: conn} = oauth_access(["write:statuses"], user: user)
|
||||||
|
|
Loading…
Reference in a new issue