projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'issue/1855' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
mastodon_api
/
controllers
/
status_controller.ex
diff --git
a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex
b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex
index 83d997abdf24ed944944b75dd341fb0a8fd64838..468b44b6758ea43f89d67fb7603d6c19a1dabb2b 100644
(file)
--- a/
lib/pleroma/web/mastodon_api/controllers/status_controller.ex
+++ b/
lib/pleroma/web/mastodon_api/controllers/status_controller.ex
@@
-84,13
+84,13
@@
defmodule Pleroma.Web.MastodonAPI.StatusController do
plug(
RateLimiter,
plug(
RateLimiter,
- [name: :status_id_action, bucket_name: "status_id_action:reblog_unreblog", params: [
"id"
]]
+ [name: :status_id_action, bucket_name: "status_id_action:reblog_unreblog", params: [
:id
]]
when action in ~w(reblog unreblog)a
)
plug(
RateLimiter,
when action in ~w(reblog unreblog)a
)
plug(
RateLimiter,
- [name: :status_id_action, bucket_name: "status_id_action:fav_unfav", params: [
"id"
]]
+ [name: :status_id_action, bucket_name: "status_id_action:fav_unfav", params: [
:id
]]
when action in ~w(favourite unfavourite)a
)
when action in ~w(favourite unfavourite)a
)
@@
-359,9
+359,9
@@
defmodule Pleroma.Web.MastodonAPI.StatusController do
with %Activity{} = activity <- Activity.get_by_id(id) do
activities =
ActivityPub.fetch_activities_for_context(activity.data["context"], %{
with %Activity{} = activity <- Activity.get_by_id(id) do
activities =
ActivityPub.fetch_activities_for_context(activity.data["context"], %{
-
"blocking_user" =>
user,
-
"user" =>
user,
-
"exclude_id" =>
activity.id
+
blocking_user:
user,
+
user:
user,
+
exclude_id:
activity.id
})
render(conn, "context.json", activity: activity, activities: activities, user: user)
})
render(conn, "context.json", activity: activity, activities: activities, user: user)
@@
-370,11
+370,6
@@
defmodule Pleroma.Web.MastodonAPI.StatusController do
@doc "GET /api/v1/favourites"
def favourites(%{assigns: %{user: %User{} = user}} = conn, params) do
@doc "GET /api/v1/favourites"
def favourites(%{assigns: %{user: %User{} = user}} = conn, params) do
- params =
- params
- |> Map.new(fn {key, value} -> {to_string(key), value} end)
- |> Map.take(Pleroma.Pagination.page_keys())
-
activities = ActivityPub.fetch_favourites(user, params)
conn
activities = ActivityPub.fetch_favourites(user, params)
conn