mirror of
https://gitlab.computer.surgery/matrix/grapevine.git
synced 2025-12-16 15:21:24 +01:00
show count of corrupted media keys in delete-remote-media command
This commit is contained in:
parent
79bc2525e3
commit
ed789e6536
1 changed files with 17 additions and 1 deletions
|
|
@ -806,8 +806,10 @@ impl Service {
|
|||
}
|
||||
});
|
||||
|
||||
let mut failed_keys = 0;
|
||||
while let Some(mxc) = rx.recv().await {
|
||||
let Ok(mxc) = mxc else {
|
||||
failed_keys += 1;
|
||||
continue;
|
||||
};
|
||||
|
||||
|
|
@ -828,11 +830,25 @@ impl Service {
|
|||
}
|
||||
}
|
||||
|
||||
let message = if dry_run {
|
||||
let mut message = if dry_run {
|
||||
format!("{count} media objects would be deleted.")
|
||||
} else {
|
||||
format!("{count} media objects deleted.")
|
||||
};
|
||||
|
||||
if failed_keys != 0 {
|
||||
write!(
|
||||
message,
|
||||
"\n{failed_keys} corrupted media keys found in the \
|
||||
database."
|
||||
)
|
||||
.unwrap();
|
||||
write!(
|
||||
message,
|
||||
"\nCheck the server logs for more details."
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
RoomMessageEventContent::text_plain(message)
|
||||
}
|
||||
AdminCommand::DeactivateUser {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue