mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +01:00
enable error_on_line_overflow and fix errors
These required some manual intervention.
This commit is contained in:
parent
0afc1d2f50
commit
5cb2551422
6 changed files with 75 additions and 60 deletions
|
|
@ -35,58 +35,61 @@ pub(crate) async fn report_event_route(
|
|||
));
|
||||
};
|
||||
|
||||
services()
|
||||
.admin
|
||||
.send_message(message::RoomMessageEventContent::text_html(
|
||||
format!(
|
||||
"Report received from: {}\n\nEvent ID: {:?}\nRoom ID: {:?}\nSent \
|
||||
By: {:?}\n\nReport Score: {:?}\nReport Reason: {:?}",
|
||||
sender_user, pdu.event_id, pdu.room_id, pdu.sender, body.score, body.reason
|
||||
),
|
||||
format!(
|
||||
r#"
|
||||
<details>
|
||||
<summary>
|
||||
Report received from:
|
||||
<a href="https://matrix.to/#/{0:?}">{0:?}</a>
|
||||
</summary>
|
||||
<ul>
|
||||
<li>
|
||||
Event Info
|
||||
<ul>
|
||||
<li>
|
||||
Event ID:
|
||||
<code>{1:?}</code>
|
||||
<a href="https://matrix.to/#/{2:?}/{1:?}">🔗</a>
|
||||
</li>
|
||||
<li>
|
||||
Room ID:
|
||||
<code>{2:?}</code>
|
||||
</li>
|
||||
<li>
|
||||
Sent By:
|
||||
<a href="https://matrix.to/#/{3:?}">{3:?}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Report Info
|
||||
<ul>
|
||||
<li>Report Score: {4:?}</li>
|
||||
<li>Report Reason: {5}</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
"#,
|
||||
sender_user,
|
||||
pdu.event_id,
|
||||
pdu.room_id,
|
||||
pdu.sender,
|
||||
body.score,
|
||||
html_escape::encode_safe(body.reason.as_deref().unwrap_or(""))
|
||||
),
|
||||
));
|
||||
services().admin.send_message(message::RoomMessageEventContent::text_html(
|
||||
format!(
|
||||
"Report received from: {}\n\nEvent ID: {:?}\nRoom ID: {:?}\nSent \
|
||||
By: {:?}\n\nReport Score: {:?}\nReport Reason: {:?}",
|
||||
sender_user,
|
||||
pdu.event_id,
|
||||
pdu.room_id,
|
||||
pdu.sender,
|
||||
body.score,
|
||||
body.reason
|
||||
),
|
||||
format!(
|
||||
r#"
|
||||
<details>
|
||||
<summary>
|
||||
Report received from:
|
||||
<a href="https://matrix.to/#/{0:?}">{0:?}</a>
|
||||
</summary>
|
||||
<ul>
|
||||
<li>
|
||||
Event Info
|
||||
<ul>
|
||||
<li>
|
||||
Event ID:
|
||||
<code>{1:?}</code>
|
||||
<a href="https://matrix.to/#/{2:?}/{1:?}">🔗</a>
|
||||
</li>
|
||||
<li>
|
||||
Room ID:
|
||||
<code>{2:?}</code>
|
||||
</li>
|
||||
<li>
|
||||
Sent By:
|
||||
<a href="https://matrix.to/#/{3:?}">{3:?}</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
Report Info
|
||||
<ul>
|
||||
<li>Report Score: {4:?}</li>
|
||||
<li>Report Reason: {5}</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
"#,
|
||||
sender_user,
|
||||
pdu.event_id,
|
||||
pdu.room_id,
|
||||
pdu.sender,
|
||||
body.score,
|
||||
html_escape::encode_safe(body.reason.as_deref().unwrap_or(""))
|
||||
),
|
||||
));
|
||||
|
||||
Ok(report_content::v3::Response {})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue