fix(membership): remove join_authorized_via_users_server field on state update
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
172d71e365
commit
68e64392f0
2 changed files with 4 additions and 0 deletions
|
@ -310,6 +310,7 @@ pub async fn ban_user_route(body: Ruma<ban_user::v3::Request>) -> Result<ban_use
|
||||||
.unwrap_or_default(),
|
.unwrap_or_default(),
|
||||||
blurhash: services().users.blurhash(&body.user_id).unwrap_or_default(),
|
blurhash: services().users.blurhash(&body.user_id).unwrap_or_default(),
|
||||||
reason: body.reason.clone(),
|
reason: body.reason.clone(),
|
||||||
|
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."))
|
||||||
|
@ -368,6 +369,7 @@ pub async fn unban_user_route(body: Ruma<unban_user::v3::Request>) -> Result<unb
|
||||||
|
|
||||||
event.membership = MembershipState::Leave;
|
event.membership = MembershipState::Leave;
|
||||||
event.reason.clone_from(&body.reason);
|
event.reason.clone_from(&body.reason);
|
||||||
|
event.join_authorized_via_users_server = None;
|
||||||
|
|
||||||
let mutex_state = Arc::clone(
|
let mutex_state = Arc::clone(
|
||||||
services()
|
services()
|
||||||
|
|
|
@ -42,6 +42,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
|
||||||
|
@ -179,6 +180,7 @@ pub async fn set_avatar_url_route(body: Ruma<set_avatar_url::v3::Request>) -> Re
|
||||||
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…
Add table
Reference in a new issue