diff --git a/src/fully_read.rs b/src/fully_read.rs index ae629b10..cd2e0458 100644 --- a/src/fully_read.rs +++ b/src/fully_read.rs @@ -13,7 +13,10 @@ ruma_event! { event_type: FullyRead, fields: { /// The unique identifier for the room associated with this event. - pub room_id: RoomId, + /// + /// `None` if the room is known through other means (such as this even being part of an + /// event list scoped to a room in a `/sync` response) + pub room_id: Option, }, content: { /// The event the user's read marker is located at in the room. diff --git a/src/receipt.rs b/src/receipt.rs index d6d89809..773b485b 100644 --- a/src/receipt.rs +++ b/src/receipt.rs @@ -14,7 +14,10 @@ ruma_event! { event_type: Receipt, fields: { /// The unique identifier for the room associated with this event. - pub room_id: RoomId, + /// + /// `None` if the room is known through other means (such as this even being part of an + /// event list scoped to a room in a `/sync` response) + pub room_id: Option, }, content_type_alias: { /// The payload for `ReceiptEvent`. diff --git a/src/typing.rs b/src/typing.rs index 6c136408..77ca4957 100644 --- a/src/typing.rs +++ b/src/typing.rs @@ -10,7 +10,10 @@ ruma_event! { event_type: Typing, fields: { /// The unique identifier for the room associated with this event. - pub room_id: RoomId, + /// + /// `None` if the room is known through other means (such as this even being part of an + /// event list scoped to a room in a `/sync` response) + pub room_id: Option, }, content: { /// The list of user IDs typing in this room, if any.