mirror of
https://github.com/girlbossceo/ruwuma.git
synced 2025-04-29 06:49:48 -04:00
allow no event_id in predecessor like synapse
Signed-off-by: June Clementine Strawberry <june@3.dog>
This commit is contained in:
parent
7c97c2b1a2
commit
ea12786571
1 changed files with 5 additions and 2 deletions
|
@ -115,12 +115,15 @@ pub struct PreviousRoom {
|
|||
pub room_id: OwnedRoomId,
|
||||
|
||||
/// The event ID of the last known event in the old room.
|
||||
pub event_id: OwnedEventId,
|
||||
/// conduwuit makes this optional because Synapse allows an empty event_id
|
||||
/// and there are no issues with this.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub event_id: Option<OwnedEventId>,
|
||||
}
|
||||
|
||||
impl PreviousRoom {
|
||||
/// Creates a new `PreviousRoom` from the given room and event IDs.
|
||||
pub fn new(room_id: OwnedRoomId, event_id: OwnedEventId) -> Self {
|
||||
pub fn new(room_id: OwnedRoomId, event_id: Option<OwnedEventId>) -> Self {
|
||||
Self { room_id, event_id }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue