mirror of https://github.com/LemmyNet/lemmy.git
Fixing reason lengths to char counts.
parent
2e5ccaf7fe
commit
acadf0289e
|
@ -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 New Issue