mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-07-29 19:28:31 +00:00
move PduEvent from services to core
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
229f2fde7a
commit
0cea64309a
15 changed files with 118 additions and 100 deletions
16
src/core/pdu/builder.rs
Normal file
16
src/core/pdu/builder.rs
Normal file
|
@ -0,0 +1,16 @@
|
|||
use std::{collections::BTreeMap, sync::Arc};
|
||||
|
||||
use ruma::{events::TimelineEventType, EventId};
|
||||
use serde::Deserialize;
|
||||
use serde_json::value::RawValue as RawJsonValue;
|
||||
|
||||
/// Build the start of a PDU in order to add it to the Database.
|
||||
#[derive(Debug, Deserialize)]
|
||||
pub struct PduBuilder {
|
||||
#[serde(rename = "type")]
|
||||
pub event_type: TimelineEventType,
|
||||
pub content: Box<RawJsonValue>,
|
||||
pub unsigned: Option<BTreeMap<String, serde_json::Value>>,
|
||||
pub state_key: Option<String>,
|
||||
pub redacts: Option<Arc<EventId>>,
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue