mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
reformat report formatting
I manually expanded the HTML into a more readable format, the rest was rustfmt's doing. It's beyond me why/how someone would willing write a pile of HTML like that...
This commit is contained in:
parent
6bc17b268c
commit
40d6ce230d
1 changed files with 39 additions and 13 deletions
|
|
@ -35,24 +35,50 @@ pub(crate) async fn report_event_route(
|
|||
));
|
||||
};
|
||||
|
||||
services().admin
|
||||
services()
|
||||
.admin
|
||||
.send_message(message::RoomMessageEventContent::text_html(
|
||||
format!(
|
||||
"Report received from: {}\n\n\
|
||||
Event ID: {:?}\n\
|
||||
Room ID: {:?}\n\
|
||||
Sent By: {:?}\n\n\
|
||||
Report Score: {:?}\n\
|
||||
Report Reason: {:?}",
|
||||
"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!(
|
||||
"<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>",
|
||||
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue