remove some unnecessary debug prints on notices
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
ee6af6c90e
commit
9466aeb088
2 changed files with 24 additions and 19 deletions
|
@ -33,10 +33,18 @@ pub(crate) async fn report_room_route(
|
|||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
|
||||
info!(
|
||||
"Received room report by user {sender_user} for room {} with reason: {:?}",
|
||||
body.room_id, body.reason
|
||||
"Received room report by user {sender_user} for room {} with reason: \"{}\"",
|
||||
body.room_id,
|
||||
body.reason.as_deref().unwrap_or("")
|
||||
);
|
||||
|
||||
if body.reason.as_ref().is_some_and(|s| s.len() > 750) {
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::InvalidParam,
|
||||
"Reason too long, should be 750 characters or fewer",
|
||||
));
|
||||
};
|
||||
|
||||
delay_response().await;
|
||||
|
||||
if !services
|
||||
|
@ -50,13 +58,6 @@ pub(crate) async fn report_room_route(
|
|||
)));
|
||||
}
|
||||
|
||||
if body.reason.as_ref().is_some_and(|s| s.len() > 750) {
|
||||
return Err(Error::BadRequest(
|
||||
ErrorKind::InvalidParam,
|
||||
"Reason too long, should be 750 characters or fewer",
|
||||
));
|
||||
};
|
||||
|
||||
// send admin room message that we received the report with an @room ping for
|
||||
// urgency
|
||||
services
|
||||
|
@ -85,8 +86,10 @@ pub(crate) async fn report_event_route(
|
|||
let sender_user = body.sender_user.as_ref().expect("user is authenticated");
|
||||
|
||||
info!(
|
||||
"Received event report by user {sender_user} for room {} and event ID {}, with reason: {:?}",
|
||||
body.room_id, body.event_id, body.reason
|
||||
"Received event report by user {sender_user} for room {} and event ID {}, with reason: \"{}\"",
|
||||
body.room_id,
|
||||
body.event_id,
|
||||
body.reason.as_deref().unwrap_or("")
|
||||
);
|
||||
|
||||
delay_response().await;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue