mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-17 15:51:23 +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(
|
.send_message(message::RoomMessageEventContent::text_html(
|
||||||
format!(
|
format!(
|
||||||
"Report received from: {}\n\n\
|
"Report received from: {}\n\nEvent ID: {:?}\nRoom ID: {:?}\nSent \
|
||||||
Event ID: {:?}\n\
|
By: {:?}\n\nReport Score: {:?}\nReport Reason: {:?}",
|
||||||
Room ID: {:?}\n\
|
|
||||||
Sent By: {:?}\n\n\
|
|
||||||
Report Score: {:?}\n\
|
|
||||||
Report Reason: {:?}",
|
|
||||||
sender_user, pdu.event_id, pdu.room_id, pdu.sender, body.score, body.reason
|
sender_user, pdu.event_id, pdu.room_id, pdu.sender, body.score, body.reason
|
||||||
),
|
),
|
||||||
format!(
|
format!(
|
||||||
"<details><summary>Report received from: <a href=\"https://matrix.to/#/{0:?}\">{0:?}\
|
r#"
|
||||||
</a></summary><ul><li>Event Info<ul><li>Event ID: <code>{1:?}</code>\
|
<details>
|
||||||
<a href=\"https://matrix.to/#/{2:?}/{1:?}\">🔗</a></li><li>Room ID: <code>{2:?}</code>\
|
<summary>
|
||||||
</li><li>Sent By: <a href=\"https://matrix.to/#/{3:?}\">{3:?}</a></li></ul></li><li>\
|
Report received from:
|
||||||
Report Info<ul><li>Report Score: {4:?}</li><li>Report Reason: {5}</li></ul></li>\
|
<a href="https://matrix.to/#/{0:?}">{0:?}</a>
|
||||||
</ul></details>",
|
</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,
|
sender_user,
|
||||||
pdu.event_id,
|
pdu.event_id,
|
||||||
pdu.room_id,
|
pdu.room_id,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue