mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-26 21:01:34 +00:00
Fixing reason lengths to char counts.
This commit is contained in:
parent
2e5ccaf7fe
commit
acadf0289e
2 changed files with 2 additions and 2 deletions
|
@ -672,7 +672,7 @@ impl Perform for CreateCommentReport {
|
|||
if reason.is_empty() {
|
||||
return Err(APIError::err("report_reason_required").into());
|
||||
}
|
||||
if reason.len() > 1000 {
|
||||
if reason.chars().count() > 1000 {
|
||||
return Err(APIError::err("report_too_long").into());
|
||||
}
|
||||
|
||||
|
|
|
@ -749,7 +749,7 @@ impl Perform for CreatePostReport {
|
|||
if reason.is_empty() {
|
||||
return Err(APIError::err("report_reason_required").into());
|
||||
}
|
||||
if reason.len() > 1000 {
|
||||
if reason.chars().count() > 1000 {
|
||||
return Err(APIError::err("report_too_long").into());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue