Fix review issues, Remove EventHash's in prev/auth_events in StateEvent
The latest state-res crate uses ruma's PduRoomV3 PDU's which don't have tuples of (EventId, EventHashs) like previous versions did (this was left from rebasing onto master). The Media DB now takes an optional content_type like the updated ruma structs.
This commit is contained in:
parent
acd144e934
commit
234b226468
5 changed files with 23 additions and 26 deletions
14
src/pdu.rs
14
src/pdu.rs
|
@ -225,7 +225,7 @@ impl PduEvent {
|
|||
impl From<&state_res::StateEvent> for PduEvent {
|
||||
fn from(pdu: &state_res::StateEvent) -> Self {
|
||||
Self {
|
||||
event_id: pdu.event_id().clone(),
|
||||
event_id: pdu.event_id(),
|
||||
room_id: pdu.room_id().unwrap().clone(),
|
||||
sender: pdu.sender().clone(),
|
||||
origin_server_ts: (pdu
|
||||
|
@ -260,17 +260,9 @@ impl PduEvent {
|
|||
"type": self.kind,
|
||||
"content": self.content,
|
||||
"state_key": self.state_key,
|
||||
"prev_events": self.prev_events
|
||||
.iter()
|
||||
// TODO How do we create one of these
|
||||
.map(|id| (id, EventHash { sha256: "hello".into() }))
|
||||
.collect::<Vec<_>>(),
|
||||
"prev_events": self.prev_events,
|
||||
"depth": self.depth,
|
||||
"auth_events": self.auth_events
|
||||
.iter()
|
||||
// TODO How do we create one of these
|
||||
.map(|id| (id, EventHash { sha256: "hello".into() }))
|
||||
.collect::<Vec<_>>(),
|
||||
"auth_events": self.auth_events,
|
||||
"redacts": self.redacts,
|
||||
"unsigned": self.unsigned,
|
||||
"hashes": self.hashes,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue