From: Ivan Tashkinov Date: Wed, 25 Mar 2020 06:05:17 +0000 (+0300) Subject: Merge remote-tracking branch 'remotes/origin/develop' into 1364-notifications-sending... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=012d428e1ffdd83888f339e4dbaec344202eebe1;p=akkoma Merge remote-tracking branch 'remotes/origin/develop' into 1364-notifications-sending-control --- 012d428e1ffdd83888f339e4dbaec344202eebe1 diff --cc lib/pleroma/web/mastodon_api/controllers/account_controller.ex index 9d83a9fc1,fb80dd348..21bc3d5a5 --- a/lib/pleroma/web/mastodon_api/controllers/account_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/account_controller.ex @@@ -60,18 -59,14 +59,18 @@@ defmodule Pleroma.Web.MastodonAPI.Accou plug( Pleroma.Plugs.EnsurePublicOrAuthenticatedPlug - when action != :create + when action not in [:create, :show, :statuses] ) - @relations [:follow, :unfollow] + @relationship_actions [:follow, :unfollow] @needs_account ~W(followers following lists follow unfollow mute unmute block unblock)a - plug(RateLimiter, [name: :relations_id_action, params: ["id", "uri"]] when action in @relations) - plug(RateLimiter, [name: :relations_actions] when action in @relations) + plug( + RateLimiter, + [name: :relation_id_action, params: ["id", "uri"]] when action in @relationship_actions + ) + + plug(RateLimiter, [name: :relations_actions] when action in @relationship_actions) plug(RateLimiter, [name: :app_account_creation] when action == :create) plug(:assign_account_by_id when action in @needs_account)