convert_to_outgoing_federation_event takes CanonicalJsonObj
This commit is contained in:
parent
27e686f9ff
commit
c173ce43a5
3 changed files with 19 additions and 21 deletions
|
@ -385,8 +385,8 @@ impl Rooms {
|
|||
})
|
||||
}
|
||||
|
||||
/// Returns the pdu.
|
||||
pub fn get_pdu_json_from_id(&self, pdu_id: &[u8]) -> Result<Option<serde_json::Value>> {
|
||||
/// Returns the pdu as a `BTreeMap<String, CanonicalJsonValue>`.
|
||||
pub fn get_pdu_json_from_id(&self, pdu_id: &[u8]) -> Result<Option<CanonicalJsonObject>> {
|
||||
self.pduid_pdu.get(pdu_id)?.map_or(Ok(None), |pdu| {
|
||||
Ok(Some(
|
||||
serde_json::from_slice(&pdu)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue