Make all room_id's in events (not event content) optional

This commit is contained in:
Jonas Platte 2020-02-18 22:08:38 +01:00
parent a10da82ec0
commit 78eae67fac
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
3 changed files with 12 additions and 3 deletions

View File

@ -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<RoomId>,
},
content: {
/// The event the user's read marker is located at in the room.

View File

@ -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<RoomId>,
},
content_type_alias: {
/// The payload for `ReceiptEvent`.

View File

@ -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<RoomId>,
},
content: {
/// The list of user IDs typing in this room, if any.