Admin room improvements

This commit is contained in:
Timo Kösters 2020-11-09 12:21:04 +01:00
parent 16b22bb432
commit 9f8cffcd22
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
18 changed files with 152 additions and 29 deletions

View file

@ -8,6 +8,7 @@ use ruma::{api::federation, ServerName};
use sled::IVec;
use tokio::select;
#[derive(Clone)]
pub struct Sending {
/// The state for a given state hash.
pub(super) servernamepduids: sled::Tree, // ServernamePduId = ServerName + PduId
@ -54,7 +55,7 @@ impl Sending {
))
})
.filter_map(|r| r.ok())
.filter(|pdu| !pdu.is_empty()) // Skip reservation key
.filter(|(_, pdu)| !pdu.is_empty()) // Skip reservation key
.take(50)
// This should not contain more than 50 anyway
{