mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-06-14 11:29:22 +00:00
Fix wrong op
This commit is contained in:
parent
52dcce3043
commit
af81a4a905
|
@ -485,7 +485,6 @@ impl ChatServer {
|
|||
UserOperationCrud::CreatePost => rate_limiter.post().check(ip),
|
||||
UserOperationCrud::CreateCommunity => rate_limiter.register().check(ip),
|
||||
UserOperationCrud::CreateComment => rate_limiter.comment().check(ip),
|
||||
UserOperationCrud::Search => rate_limiter.search().check(ip),
|
||||
_ => true,
|
||||
};
|
||||
let fut = (message_handler_crud)(context, msg.id, user_operation_crud, data);
|
||||
|
@ -494,6 +493,7 @@ impl ChatServer {
|
|||
let user_operation = UserOperation::from_str(op)?;
|
||||
let passed = match user_operation {
|
||||
UserOperation::GetCaptcha => rate_limiter.post().check(ip),
|
||||
UserOperation::Search => rate_limiter.search().check(ip),
|
||||
_ => true,
|
||||
};
|
||||
let fut = (message_handler)(context, msg.id, user_operation, data);
|
||||
|
|
Loading…
Reference in a new issue