mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-16 18:10:51 +01:00
Merge branch 'remove-join_authorized_via_users_servers' into 'next'
fix(membership): remove join_authorized_via_users_server field on state update See merge request famedly/conduit!619
This commit is contained in:
commit
03f9c888f0
2 changed files with 4 additions and 0 deletions
|
@ -270,6 +270,7 @@ pub async fn ban_user_route(body: Ruma<ban_user::v3::Request>) -> Result<ban_use
|
||||||
serde_json::from_str(event.content.get())
|
serde_json::from_str(event.content.get())
|
||||||
.map(|event: RoomMemberEventContent| RoomMemberEventContent {
|
.map(|event: RoomMemberEventContent| RoomMemberEventContent {
|
||||||
membership: MembershipState::Ban,
|
membership: MembershipState::Ban,
|
||||||
|
join_authorized_via_users_server: None,
|
||||||
..event
|
..event
|
||||||
})
|
})
|
||||||
.map_err(|_| Error::bad_database("Invalid member event in database."))
|
.map_err(|_| Error::bad_database("Invalid member event in database."))
|
||||||
|
@ -1465,6 +1466,7 @@ pub async fn leave_room(user_id: &UserId, room_id: &RoomId, reason: Option<Strin
|
||||||
|
|
||||||
event.membership = MembershipState::Leave;
|
event.membership = MembershipState::Leave;
|
||||||
event.reason = reason;
|
event.reason = reason;
|
||||||
|
event.join_authorized_via_users_server = None;
|
||||||
|
|
||||||
services()
|
services()
|
||||||
.rooms
|
.rooms
|
||||||
|
|
|
@ -40,6 +40,7 @@ pub async fn set_displayname_route(
|
||||||
event_type: TimelineEventType::RoomMember,
|
event_type: TimelineEventType::RoomMember,
|
||||||
content: to_raw_value(&RoomMemberEventContent {
|
content: to_raw_value(&RoomMemberEventContent {
|
||||||
displayname: body.displayname.clone(),
|
displayname: body.displayname.clone(),
|
||||||
|
join_authorized_via_users_server: None,
|
||||||
..serde_json::from_str(
|
..serde_json::from_str(
|
||||||
services()
|
services()
|
||||||
.rooms
|
.rooms
|
||||||
|
@ -174,6 +175,7 @@ pub async fn set_avatar_url_route(
|
||||||
event_type: TimelineEventType::RoomMember,
|
event_type: TimelineEventType::RoomMember,
|
||||||
content: to_raw_value(&RoomMemberEventContent {
|
content: to_raw_value(&RoomMemberEventContent {
|
||||||
avatar_url: body.avatar_url.clone(),
|
avatar_url: body.avatar_url.clone(),
|
||||||
|
join_authorized_via_users_server: None,
|
||||||
..serde_json::from_str(
|
..serde_json::from_str(
|
||||||
services()
|
services()
|
||||||
.rooms
|
.rooms
|
||||||
|
|
Loading…
Reference in a new issue