mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-18 05:25:40 +09:00
fix(admin): delete messages from panel (#1322)
This commit is contained in:
1 parent
ba14ec85b4
commit
a8f8948062
3 files changed
+102
-10
No files matched your search
@@ -98,7 +98,11 @@ pub(crate) async fn messages_post(
|
||||
let (Some(cid), Some(mid)) = (&channel_id, &message_id) else {
|
||||
return json_error(StatusCode::BAD_REQUEST, "Missing channel_id or message_id");
|
||||
};
|
||||
return match client.delete_message(cid, mid).await {
|
||||
let audit_log_reason = form.clean("audit_log_reason");
|
||||
return match client
|
||||
.delete_message(cid, mid, audit_log_reason.as_deref())
|
||||
.await
|
||||
{
|
||||
Ok(()) => Json(serde_json::json!({"success": true})).into_response(),
|
||||
Err(e) => json_error(StatusCode::BAD_REQUEST, &format!("{e}")),
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user