federation-api: Use SpaceRoomJoinRule for SpaceHierarchy(Parent/Child)Summary(Init)
This commit is contained in:
parent
86b999055e
commit
52aa539cf0
@ -1,5 +1,10 @@
|
|||||||
# [unreleased]
|
# [unreleased]
|
||||||
|
|
||||||
|
Bug fixes:
|
||||||
|
|
||||||
|
* Use `SpaceRoomJoinRule` for `SpaceHierarchy(Parent/Child)Summary(Init)`. Even if
|
||||||
|
(de)serialization worked before, it is more correct to expect any join rule, like in the CS API
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
* Deprecate the `v1/send_join` and `v1/send_leave` endpoints according to a spec clarification
|
* Deprecate the `v1/send_join` and `v1/send_leave` endpoints according to a spec clarification
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
use js_int::UInt;
|
use js_int::UInt;
|
||||||
use ruma_common::{
|
use ruma_common::{
|
||||||
directory::PublicRoomJoinRule, events::space::child::HierarchySpaceChildEvent, room::RoomType,
|
events::space::child::HierarchySpaceChildEvent, room::RoomType, serde::Raw,
|
||||||
serde::Raw, OwnedMxcUri, OwnedRoomAliasId, OwnedRoomId,
|
space::SpaceRoomJoinRule, OwnedMxcUri, OwnedRoomAliasId, OwnedRoomId,
|
||||||
};
|
};
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ pub struct SpaceHierarchyParentSummary {
|
|||||||
|
|
||||||
/// The join rule of the room.
|
/// The join rule of the room.
|
||||||
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
||||||
pub join_rule: PublicRoomJoinRule,
|
pub join_rule: SpaceRoomJoinRule,
|
||||||
|
|
||||||
/// The type of room from `m.room.create`, if any.
|
/// The type of room from `m.room.create`, if any.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
@ -101,7 +101,7 @@ pub struct SpaceHierarchyParentSummaryInit {
|
|||||||
pub guest_can_join: bool,
|
pub guest_can_join: bool,
|
||||||
|
|
||||||
/// The join rule of the room.
|
/// The join rule of the room.
|
||||||
pub join_rule: PublicRoomJoinRule,
|
pub join_rule: SpaceRoomJoinRule,
|
||||||
|
|
||||||
/// The stripped `m.space.child` events of the space-room.
|
/// The stripped `m.space.child` events of the space-room.
|
||||||
///
|
///
|
||||||
@ -195,7 +195,7 @@ pub struct SpaceHierarchyChildSummary {
|
|||||||
|
|
||||||
/// The join rule of the room.
|
/// The join rule of the room.
|
||||||
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
#[serde(default, skip_serializing_if = "ruma_common::serde::is_default")]
|
||||||
pub join_rule: PublicRoomJoinRule,
|
pub join_rule: SpaceRoomJoinRule,
|
||||||
|
|
||||||
/// The type of room from `m.room.create`, if any.
|
/// The type of room from `m.room.create`, if any.
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
@ -229,7 +229,7 @@ pub struct SpaceHierarchyChildSummaryInit {
|
|||||||
pub guest_can_join: bool,
|
pub guest_can_join: bool,
|
||||||
|
|
||||||
/// The join rule of the room.
|
/// The join rule of the room.
|
||||||
pub join_rule: PublicRoomJoinRule,
|
pub join_rule: SpaceRoomJoinRule,
|
||||||
|
|
||||||
/// If the room is a restricted room, these are the room IDs which are specified by the join
|
/// If the room is a restricted room, these are the room IDs which are specified by the join
|
||||||
/// rules.
|
/// rules.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user