aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/mongooseim/mongoose_im_controller.ex
diff options
context:
space:
mode:
authorSteven Fuchs <steven.fuchs@dockyard.com>2019-11-11 12:13:06 +0000
committerlain <lain@soykaf.club>2019-11-11 12:13:06 +0000
commit94627baa5cca524fe0c4f7043e25d71ed245626a (patch)
tree6b71d1a382fdb4dbcf2510397bbd59405afc79a4 /lib/pleroma/web/mongooseim/mongoose_im_controller.ex
parent7438c177d9f57e8779b979ca553c3b501726efb3 (diff)
downloadpleroma-94627baa5cca524fe0c4f7043e25d71ed245626a.tar.gz
New rate limiter
Diffstat (limited to 'lib/pleroma/web/mongooseim/mongoose_im_controller.ex')
-rw-r--r--lib/pleroma/web/mongooseim/mongoose_im_controller.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pleroma/web/mongooseim/mongoose_im_controller.ex b/lib/pleroma/web/mongooseim/mongoose_im_controller.ex
index 6ed181cff..358600e7d 100644
--- a/lib/pleroma/web/mongooseim/mongoose_im_controller.ex
+++ b/lib/pleroma/web/mongooseim/mongoose_im_controller.ex
@@ -10,8 +10,8 @@ defmodule Pleroma.Web.MongooseIM.MongooseIMController do
alias Pleroma.Repo
alias Pleroma.User
- plug(RateLimiter, :authentication when action in [:user_exists, :check_password])
- plug(RateLimiter, {:authentication, params: ["user"]} when action == :check_password)
+ plug(RateLimiter, [name: :authentication] when action in [:user_exists, :check_password])
+ plug(RateLimiter, [name: :authentication, params: ["user"]] when action == :check_password)
def user_exists(conn, %{"user" => username}) do
with %User{} <- Repo.get_by(User, nickname: username, local: true) do