Skip to content

Commit

Permalink
dont copy join_authorized_via_users_server on leaving rooms
Browse files Browse the repository at this point in the history
Signed-off-by: strawberry <[email protected]>
  • Loading branch information
girlbossceo committed Dec 15, 2024
1 parent aeae67a commit 004671b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/api/client/membership.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
use axum::extract::State;
use axum_client_ip::InsecureClientIp;
use conduwuit::{
debug, debug_info, debug_warn, err, error, info,
debug, debug_info, debug_warn, err, info,
pdu::{self, gen_event_id_canonical_json, PduBuilder},
result::FlatOk,
trace,
Expand Down Expand Up @@ -1621,7 +1621,9 @@ pub async fn leave_room(
.await
else {
// Fix for broken rooms
error!("Trying to leave a room you are not a member of.");
warn!(
"Trying to leave a room you are not a member of, marking room as left locally."
);

services
.rooms
Expand All @@ -1647,6 +1649,8 @@ pub async fn leave_room(
PduBuilder::state(user_id.to_string(), &RoomMemberEventContent {
membership: MembershipState::Leave,
reason,
join_authorized_via_users_server: None,
is_direct: None,
..event
}),
user_id,
Expand Down

0 comments on commit 004671b

Please sign in to comment.