Skip to content
Snippets Groups Projects
Commit 0f13ada3 authored by 🥺's avatar 🥺 :transgender_flag: Committed by 🥺
Browse files

return more user-friendly message for debug memory-stats

parent a7f8c848
No related branches found
No related tags found
No related merge requests found
...@@ -455,5 +455,14 @@ pub(crate) async fn resolve_true_destination( ...@@ -455,5 +455,14 @@ pub(crate) async fn resolve_true_destination(
} }
pub(crate) fn memory_stats() -> RoomMessageEventContent { pub(crate) fn memory_stats() -> RoomMessageEventContent {
RoomMessageEventContent::text_html("HTML only".to_owned(), crate::alloc::memory_stats()) let html_body = crate::alloc::memory_stats();
if html_body.is_empty() {
return RoomMessageEventContent::text_plain("malloc stats are not supported on your compiled malloc.");
}
RoomMessageEventContent::text_html(
"This command's output can only be viewed by clients that render HTML.".to_owned(),
html_body,
)
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment