Remove RoomName type
This commit is contained in:
parent
31d526ebfd
commit
a8e7c47bbe
@ -17,7 +17,7 @@ pub mod v3 {
|
|||||||
},
|
},
|
||||||
room::RoomType,
|
room::RoomType,
|
||||||
serde::{Raw, StringEnum},
|
serde::{Raw, StringEnum},
|
||||||
OwnedRoomId, OwnedUserId, RoomName, RoomVersionId,
|
OwnedRoomId, OwnedUserId, RoomVersionId,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ pub mod v3 {
|
|||||||
/// If this is included, an `m.room.name` event will be sent into the room to indicate the
|
/// If this is included, an `m.room.name` event will be sent into the room to indicate the
|
||||||
/// name of the room.
|
/// name of the room.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<&'a RoomName>,
|
pub name: Option<&'a str>,
|
||||||
|
|
||||||
/// Power level content to override in the default power level event.
|
/// Power level content to override in the default power level event.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
@ -9,7 +9,7 @@ use ruma_common::{
|
|||||||
events::space::child::HierarchySpaceChildEvent,
|
events::space::child::HierarchySpaceChildEvent,
|
||||||
room::RoomType,
|
room::RoomType,
|
||||||
serde::{Raw, StringEnum},
|
serde::{Raw, StringEnum},
|
||||||
OwnedMxcUri, OwnedRoomAliasId, OwnedRoomId, RoomName,
|
OwnedMxcUri, OwnedRoomAliasId, OwnedRoomId,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ pub struct SpaceHierarchyRoomsChunk {
|
|||||||
|
|
||||||
/// The name of the room, if any.
|
/// The name of the room, if any.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<Box<RoomName>>,
|
pub name: Option<String>,
|
||||||
|
|
||||||
/// The number of members joined to the room.
|
/// The number of members joined to the room.
|
||||||
pub num_joined_members: UInt,
|
pub num_joined_members: UInt,
|
||||||
|
@ -13,6 +13,11 @@ Breaking changes:
|
|||||||
* Use new `events::call::AnswerSessionDescription` for `CallAnswerEventContent`
|
* Use new `events::call::AnswerSessionDescription` for `CallAnswerEventContent`
|
||||||
and `OfferSessionDescription` for `CallInviteEventContent`
|
and `OfferSessionDescription` for `CallInviteEventContent`
|
||||||
* Use new `VoipVersionId` and `VoipId` types for `events::call` events
|
* Use new `VoipVersionId` and `VoipId` types for `events::call` events
|
||||||
|
* Remove `RoomName` / `OwnedRoomName` and replace usages with `str` / `String`
|
||||||
|
* Room name size limits were never enforced by servers
|
||||||
|
([Spec change removing the size limit][spec])
|
||||||
|
|
||||||
|
[spec]: https://github.com/matrix-org/matrix-spec-proposals/pull/3669
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ use serde::{
|
|||||||
};
|
};
|
||||||
use serde_json::Value as JsonValue;
|
use serde_json::Value as JsonValue;
|
||||||
|
|
||||||
use crate::{OwnedMxcUri, PrivOwnedStr, RoomName};
|
use crate::{OwnedMxcUri, PrivOwnedStr};
|
||||||
|
|
||||||
/// A chunk of a room list response, describing one room.
|
/// A chunk of a room list response, describing one room.
|
||||||
///
|
///
|
||||||
@ -33,7 +33,7 @@ pub struct PublicRoomsChunk {
|
|||||||
|
|
||||||
/// The name of the room, if any.
|
/// The name of the room, if any.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<Box<RoomName>>,
|
pub name: Option<String>,
|
||||||
|
|
||||||
/// The number of members joined to the room.
|
/// The number of members joined to the room.
|
||||||
pub num_joined_members: UInt,
|
pub num_joined_members: UInt,
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
use ruma_macros::EventContent;
|
use ruma_macros::EventContent;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::{events::EmptyStateKey, RoomName};
|
use crate::events::EmptyStateKey;
|
||||||
|
|
||||||
/// The content of an `m.room.name` event.
|
/// The content of an `m.room.name` event.
|
||||||
///
|
///
|
||||||
@ -16,12 +16,13 @@ use crate::{events::EmptyStateKey, RoomName};
|
|||||||
pub struct RoomNameEventContent {
|
pub struct RoomNameEventContent {
|
||||||
/// The name of the room.
|
/// The name of the room.
|
||||||
#[serde(default, deserialize_with = "crate::serde::empty_string_as_none")]
|
#[serde(default, deserialize_with = "crate::serde::empty_string_as_none")]
|
||||||
pub name: Option<Box<RoomName>>,
|
pub name: Option<String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl RoomNameEventContent {
|
impl RoomNameEventContent {
|
||||||
/// Create a new `RoomNameEventContent` with the given name.
|
/// Create a new `RoomNameEventContent` with the given name.
|
||||||
pub fn new(name: Option<Box<RoomName>>) -> Self {
|
pub fn new(name: Option<String>) -> Self {
|
||||||
|
let name = name.filter(|n| !n.is_empty());
|
||||||
Self { name }
|
Self { name }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -44,7 +45,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn serialization_with_optional_fields_as_none() {
|
fn serialization_with_optional_fields_as_none() {
|
||||||
let name_event = OriginalStateEvent {
|
let name_event = OriginalStateEvent {
|
||||||
content: RoomNameEventContent { name: "The room name".try_into().ok() },
|
content: RoomNameEventContent { name: Some("The room name".to_owned()) },
|
||||||
event_id: event_id!("$h29iv0s8:example.com").to_owned(),
|
event_id: event_id!("$h29iv0s8:example.com").to_owned(),
|
||||||
origin_server_ts: MilliSecondsSinceUnixEpoch(uint!(1)),
|
origin_server_ts: MilliSecondsSinceUnixEpoch(uint!(1)),
|
||||||
room_id: room_id!("!n8f893n9:example.com").to_owned(),
|
room_id: room_id!("!n8f893n9:example.com").to_owned(),
|
||||||
@ -72,7 +73,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn serialization_with_all_fields() {
|
fn serialization_with_all_fields() {
|
||||||
let name_event = OriginalStateEvent {
|
let name_event = OriginalStateEvent {
|
||||||
content: RoomNameEventContent { name: "The room name".try_into().ok() },
|
content: RoomNameEventContent { name: Some("The room name".to_owned()) },
|
||||||
event_id: event_id!("$h29iv0s8:example.com").to_owned(),
|
event_id: event_id!("$h29iv0s8:example.com").to_owned(),
|
||||||
origin_server_ts: MilliSecondsSinceUnixEpoch(uint!(1)),
|
origin_server_ts: MilliSecondsSinceUnixEpoch(uint!(1)),
|
||||||
room_id: room_id!("!n8f893n9:example.com").to_owned(),
|
room_id: room_id!("!n8f893n9:example.com").to_owned(),
|
||||||
@ -80,7 +81,7 @@ mod tests {
|
|||||||
state_key: EmptyStateKey,
|
state_key: EmptyStateKey,
|
||||||
unsigned: StateUnsigned {
|
unsigned: StateUnsigned {
|
||||||
age: Some(int!(100)),
|
age: Some(int!(100)),
|
||||||
prev_content: Some(RoomNameEventContent { name: "The old name".try_into().ok() }),
|
prev_content: Some(RoomNameEventContent { name: Some("The old name".to_owned()) }),
|
||||||
..StateUnsigned::default()
|
..StateUnsigned::default()
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -125,19 +126,6 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn name_fails_validation_when_too_long() {
|
|
||||||
// "XXXX .." 256 times
|
|
||||||
let long_string: String = "X".repeat(256);
|
|
||||||
assert_eq!(long_string.len(), 256);
|
|
||||||
|
|
||||||
let long_content_json = json!({ "name": &long_string });
|
|
||||||
let from_raw: Raw<RoomNameEventContent> = from_json_value(long_content_json).unwrap();
|
|
||||||
|
|
||||||
let result = from_raw.deserialize();
|
|
||||||
assert!(result.is_err(), "Result should be invalid: {result:?}");
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn json_with_empty_name_creates_content_as_none() {
|
fn json_with_empty_name_creates_content_as_none() {
|
||||||
let long_content_json = json!({ "name": "" });
|
let long_content_json = json!({ "name": "" });
|
||||||
@ -148,7 +136,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn new_with_empty_name_creates_content_as_none() {
|
fn new_with_empty_name_creates_content_as_none() {
|
||||||
assert_matches!(
|
assert_matches!(
|
||||||
RoomNameEventContent::new("".try_into().ok()),
|
RoomNameEventContent::new(Some("".to_owned())),
|
||||||
RoomNameEventContent { name: None }
|
RoomNameEventContent { name: None }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,6 @@ pub use self::{
|
|||||||
mxc_uri::{MxcUri, OwnedMxcUri},
|
mxc_uri::{MxcUri, OwnedMxcUri},
|
||||||
room_alias_id::{OwnedRoomAliasId, RoomAliasId},
|
room_alias_id::{OwnedRoomAliasId, RoomAliasId},
|
||||||
room_id::{OwnedRoomId, RoomId},
|
room_id::{OwnedRoomId, RoomId},
|
||||||
room_name::{OwnedRoomName, RoomName},
|
|
||||||
room_or_room_alias_id::{OwnedRoomOrAliasId, RoomOrAliasId},
|
room_or_room_alias_id::{OwnedRoomOrAliasId, RoomOrAliasId},
|
||||||
room_version_id::RoomVersionId,
|
room_version_id::RoomVersionId,
|
||||||
server_name::{OwnedServerName, ServerName},
|
server_name::{OwnedServerName, ServerName},
|
||||||
@ -54,7 +53,6 @@ mod key_name;
|
|||||||
mod mxc_uri;
|
mod mxc_uri;
|
||||||
mod room_alias_id;
|
mod room_alias_id;
|
||||||
mod room_id;
|
mod room_id;
|
||||||
mod room_name;
|
|
||||||
mod room_or_room_alias_id;
|
mod room_or_room_alias_id;
|
||||||
mod room_version_id;
|
mod room_version_id;
|
||||||
mod server_name;
|
mod server_name;
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
//! Matrix room name.
|
|
||||||
|
|
||||||
use ruma_macros::IdZst;
|
|
||||||
|
|
||||||
/// The name of a room.
|
|
||||||
///
|
|
||||||
/// It can't exceed 255 bytes or be empty.
|
|
||||||
#[repr(transparent)]
|
|
||||||
#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, IdZst)]
|
|
||||||
#[ruma_id(validate = ruma_identifiers_validation::room_name::validate)]
|
|
||||||
pub struct RoomName(str);
|
|
@ -1,19 +1,14 @@
|
|||||||
use assert_matches::assert_matches;
|
use assert_matches::assert_matches;
|
||||||
use ruma_common::{
|
use ruma_common::events::AnyInitialStateEvent;
|
||||||
events::{AnyInitialStateEvent, InitialStateEvent},
|
|
||||||
RoomName,
|
|
||||||
};
|
|
||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn deserialize_initial_state_event() {
|
fn deserialize_initial_state_event() {
|
||||||
assert_matches!(
|
let ev = serde_json::from_value(json!({
|
||||||
serde_json::from_value(json!({
|
|
||||||
"type": "m.room.name",
|
"type": "m.room.name",
|
||||||
"content": { "name": "foo" }
|
"content": { "name": "foo" }
|
||||||
}))
|
}))
|
||||||
.unwrap(),
|
.unwrap();
|
||||||
AnyInitialStateEvent::RoomName(InitialStateEvent { content, .. })
|
let ev = assert_matches!(ev, AnyInitialStateEvent::RoomName(ev) => ev);
|
||||||
if content.name == Some(Box::<RoomName>::try_from("foo").unwrap())
|
assert_eq!(ev.content.name.as_deref(), Some("foo"));
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
|
use assert_matches::assert_matches;
|
||||||
use js_int::uint;
|
use js_int::uint;
|
||||||
use ruma_common::{
|
use ruma_common::{
|
||||||
events::{
|
events::{
|
||||||
room::{join_rules::JoinRule, topic::RoomTopicEventContent},
|
room::{join_rules::JoinRule, topic::RoomTopicEventContent},
|
||||||
AnyStrippedStateEvent, EmptyStateKey, StrippedStateEvent,
|
AnyStrippedStateEvent, EmptyStateKey, StrippedStateEvent,
|
||||||
},
|
},
|
||||||
mxc_uri, user_id, RoomName,
|
mxc_uri, user_id,
|
||||||
};
|
};
|
||||||
use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
|
use serde_json::{from_value as from_json_value, json, to_value as to_json_value};
|
||||||
|
|
||||||
@ -73,37 +74,25 @@ fn deserialize_stripped_state_events() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let event = from_json_value::<AnyStrippedStateEvent>(name_event).unwrap();
|
let ev = from_json_value::<AnyStrippedStateEvent>(name_event).unwrap();
|
||||||
match event {
|
let ev = assert_matches!(ev, AnyStrippedStateEvent::RoomName(ev) => ev);
|
||||||
AnyStrippedStateEvent::RoomName(event) => {
|
assert_eq!(ev.content.name.as_deref(), Some("Ruma"));
|
||||||
assert_eq!(event.content.name, Some(Box::<RoomName>::try_from("Ruma").unwrap()));
|
assert_eq!(ev.sender.to_string(), "@example:localhost");
|
||||||
assert_eq!(event.sender.to_string(), "@example:localhost");
|
|
||||||
}
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
|
||||||
|
|
||||||
let event = from_json_value::<AnyStrippedStateEvent>(join_rules_event).unwrap();
|
let ev = from_json_value::<AnyStrippedStateEvent>(join_rules_event).unwrap();
|
||||||
match event {
|
let ev = assert_matches!(ev,AnyStrippedStateEvent::RoomJoinRules(ev)=>ev );
|
||||||
AnyStrippedStateEvent::RoomJoinRules(event) => {
|
assert_eq!(ev.content.join_rule, JoinRule::Public);
|
||||||
assert_eq!(event.content.join_rule, JoinRule::Public);
|
assert_eq!(ev.sender.to_string(), "@example:localhost");
|
||||||
assert_eq!(event.sender.to_string(), "@example:localhost");
|
|
||||||
}
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
|
||||||
|
|
||||||
let event = from_json_value::<AnyStrippedStateEvent>(avatar_event).unwrap();
|
let ev = from_json_value::<AnyStrippedStateEvent>(avatar_event).unwrap();
|
||||||
match event {
|
let ev = assert_matches!(ev, AnyStrippedStateEvent::RoomAvatar(ev) => ev);
|
||||||
AnyStrippedStateEvent::RoomAvatar(event) => {
|
assert_eq!(ev.content.url.unwrap(), mxc_uri!("mxc://example.com/iMag3"));
|
||||||
let image_info = event.content.info.unwrap();
|
assert_eq!(ev.sender.to_string(), "@example:localhost");
|
||||||
|
|
||||||
assert_eq!(image_info.height.unwrap(), uint!(128));
|
let image_info = ev.content.info.unwrap();
|
||||||
assert_eq!(image_info.width.unwrap(), uint!(128));
|
assert_eq!(image_info.height, Some(uint!(128)));
|
||||||
assert_eq!(image_info.mimetype.unwrap(), "image/jpeg");
|
assert_eq!(image_info.width, Some(uint!(128)));
|
||||||
assert_eq!(image_info.size.unwrap(), uint!(1024));
|
assert_eq!(image_info.mimetype.as_deref(), Some("image/jpeg"));
|
||||||
assert_eq!(image_info.thumbnail_info.unwrap().size.unwrap(), uint!(32));
|
assert_eq!(image_info.size, Some(uint!(1024)));
|
||||||
assert_eq!(event.content.url.unwrap(), mxc_uri!("mxc://example.com/iMag3"));
|
assert_eq!(image_info.thumbnail_info.unwrap().size, Some(uint!(32)));
|
||||||
assert_eq!(event.sender.to_string(), "@example:localhost");
|
|
||||||
}
|
|
||||||
_ => unreachable!(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
use js_int::UInt;
|
use js_int::UInt;
|
||||||
use ruma_common::{
|
use ruma_common::{
|
||||||
directory::PublicRoomJoinRule, events::space::child::HierarchySpaceChildEvent, room::RoomType,
|
directory::PublicRoomJoinRule, events::space::child::HierarchySpaceChildEvent, room::RoomType,
|
||||||
serde::Raw, OwnedMxcUri, OwnedRoomAliasId, OwnedRoomId, RoomName,
|
serde::Raw, OwnedMxcUri, OwnedRoomAliasId, OwnedRoomId,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ pub struct SpaceHierarchyParentSummary {
|
|||||||
|
|
||||||
/// The name of the room, if any.
|
/// The name of the room, if any.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<Box<RoomName>>,
|
pub name: Option<String>,
|
||||||
|
|
||||||
/// The number of members joined to the room.
|
/// The number of members joined to the room.
|
||||||
pub num_joined_members: UInt,
|
pub num_joined_members: UInt,
|
||||||
@ -155,7 +155,7 @@ pub struct SpaceHierarchyChildSummary {
|
|||||||
|
|
||||||
/// The name of the room, if any.
|
/// The name of the room, if any.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub name: Option<Box<RoomName>>,
|
pub name: Option<String>,
|
||||||
|
|
||||||
/// The number of members joined to the room.
|
/// The number of members joined to the room.
|
||||||
pub num_joined_members: UInt,
|
pub num_joined_members: UInt,
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
Breaking changes:
|
||||||
|
|
||||||
|
* Remove `room_name` module
|
||||||
|
* Room name size limits were never enforced, so they are now just regular
|
||||||
|
`String`s in Ruma ([Spec change removing the size limit][spec])
|
||||||
|
|
||||||
|
[spec]: https://github.com/matrix-org/matrix-spec-proposals/pull/3669
|
||||||
|
|
||||||
# 0.8.1
|
# 0.8.1
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
@ -10,7 +10,6 @@ pub mod mxc_uri;
|
|||||||
pub mod room_alias_id;
|
pub mod room_alias_id;
|
||||||
pub mod room_id;
|
pub mod room_id;
|
||||||
pub mod room_id_or_alias_id;
|
pub mod room_id_or_alias_id;
|
||||||
pub mod room_name;
|
|
||||||
pub mod room_version_id;
|
pub mod room_version_id;
|
||||||
pub mod server_name;
|
pub mod server_name;
|
||||||
pub mod session_id;
|
pub mod session_id;
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
use crate::Error;
|
|
||||||
|
|
||||||
pub fn validate(value: &str) -> Result<(), Error> {
|
|
||||||
match value.len() {
|
|
||||||
0 => Err(Error::Empty),
|
|
||||||
1..=255 => Ok(()),
|
|
||||||
_ => Err(Error::MaximumLengthExceeded),
|
|
||||||
}
|
|
||||||
}
|
|
@ -8,8 +8,7 @@ pub mod v2 {
|
|||||||
//! [spec]: https://spec.matrix.org/v1.2/identity-service-api/#post_matrixidentityv2store-invite
|
//! [spec]: https://spec.matrix.org/v1.2/identity-service-api/#post_matrixidentityv2store-invite
|
||||||
|
|
||||||
use ruma_common::{
|
use ruma_common::{
|
||||||
api::ruma_api, room::RoomType, thirdparty::Medium, MxcUri, RoomAliasId, RoomId, RoomName,
|
api::ruma_api, room::RoomType, thirdparty::Medium, MxcUri, RoomAliasId, RoomId, UserId,
|
||||||
UserId,
|
|
||||||
};
|
};
|
||||||
use serde::{ser::SerializeSeq, Deserialize, Serialize};
|
use serde::{ser::SerializeSeq, Deserialize, Serialize};
|
||||||
|
|
||||||
@ -61,7 +60,7 @@ pub mod v2 {
|
|||||||
///
|
///
|
||||||
/// This should be retrieved from the `m.room.name` state event.
|
/// This should be retrieved from the `m.room.name` state event.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub room_name: Option<&'a RoomName>,
|
pub room_name: Option<&'a str>,
|
||||||
|
|
||||||
/// The type of the room to which the user is invited.
|
/// The type of the room to which the user is invited.
|
||||||
///
|
///
|
||||||
|
@ -14,7 +14,7 @@ pub mod v1 {
|
|||||||
events::RoomEventType,
|
events::RoomEventType,
|
||||||
push::{PushFormat, Tweak},
|
push::{PushFormat, Tweak},
|
||||||
serde::{Incoming, StringEnum},
|
serde::{Incoming, StringEnum},
|
||||||
EventId, RoomAliasId, RoomId, RoomName, SecondsSinceUnixEpoch, UserId,
|
EventId, RoomAliasId, RoomId, SecondsSinceUnixEpoch, UserId,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use serde_json::value::RawValue as RawJsonValue;
|
use serde_json::value::RawValue as RawJsonValue;
|
||||||
@ -98,7 +98,7 @@ pub mod v1 {
|
|||||||
|
|
||||||
/// The name of the room in which the event occurred.
|
/// The name of the room in which the event occurred.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub room_name: Option<&'a RoomName>,
|
pub room_name: Option<&'a str>,
|
||||||
|
|
||||||
/// An alias to display for the room in which the event occurred.
|
/// An alias to display for the room in which the event occurred.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
@ -165,9 +165,8 @@ pub use ruma_common::{
|
|||||||
EntitySignatures, EventEncryptionAlgorithm, EventId, IdParseError, KeyId, KeyName, MatrixToUri,
|
EntitySignatures, EventEncryptionAlgorithm, EventId, IdParseError, KeyId, KeyName, MatrixToUri,
|
||||||
MatrixUri, MilliSecondsSinceUnixEpoch, MxcUri, OwnedClientSecret, OwnedDeviceId,
|
MatrixUri, MilliSecondsSinceUnixEpoch, MxcUri, OwnedClientSecret, OwnedDeviceId,
|
||||||
OwnedDeviceKeyId, OwnedDeviceSigningKeyId, OwnedEventId, OwnedKeyId, OwnedKeyName, OwnedMxcUri,
|
OwnedDeviceKeyId, OwnedDeviceSigningKeyId, OwnedEventId, OwnedKeyId, OwnedKeyName, OwnedMxcUri,
|
||||||
OwnedRoomAliasId, OwnedRoomId, OwnedRoomName, OwnedRoomOrAliasId, OwnedServerName,
|
OwnedRoomAliasId, OwnedRoomId, OwnedRoomOrAliasId, OwnedServerName, OwnedServerSigningKeyId,
|
||||||
OwnedServerSigningKeyId, OwnedSessionId, OwnedSigningKeyId, OwnedTransactionId, OwnedUserId,
|
OwnedSessionId, OwnedSigningKeyId, OwnedTransactionId, OwnedUserId, PrivOwnedStr, RoomAliasId,
|
||||||
PrivOwnedStr, RoomAliasId, RoomId, RoomName, RoomOrAliasId, RoomVersionId,
|
RoomId, RoomOrAliasId, RoomVersionId, SecondsSinceUnixEpoch, ServerName, ServerSignatures,
|
||||||
SecondsSinceUnixEpoch, ServerName, ServerSignatures, ServerSigningKeyId, SessionId, Signatures,
|
ServerSigningKeyId, SessionId, Signatures, SigningKeyAlgorithm, TransactionId, UserId,
|
||||||
SigningKeyAlgorithm, TransactionId, UserId,
|
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user