dont copy join_authorized_via_users_server on leaving rooms
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
aeae67a7ee
commit
004671b437
1 changed files with 6 additions and 2 deletions
|
@ -7,7 +7,7 @@ use std::{
|
||||||
use axum::extract::State;
|
use axum::extract::State;
|
||||||
use axum_client_ip::InsecureClientIp;
|
use axum_client_ip::InsecureClientIp;
|
||||||
use conduwuit::{
|
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},
|
pdu::{self, gen_event_id_canonical_json, PduBuilder},
|
||||||
result::FlatOk,
|
result::FlatOk,
|
||||||
trace,
|
trace,
|
||||||
|
@ -1621,7 +1621,9 @@ pub async fn leave_room(
|
||||||
.await
|
.await
|
||||||
else {
|
else {
|
||||||
// Fix for broken rooms
|
// 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
|
services
|
||||||
.rooms
|
.rooms
|
||||||
|
@ -1647,6 +1649,8 @@ pub async fn leave_room(
|
||||||
PduBuilder::state(user_id.to_string(), &RoomMemberEventContent {
|
PduBuilder::state(user_id.to_string(), &RoomMemberEventContent {
|
||||||
membership: MembershipState::Leave,
|
membership: MembershipState::Leave,
|
||||||
reason,
|
reason,
|
||||||
|
join_authorized_via_users_server: None,
|
||||||
|
is_direct: None,
|
||||||
..event
|
..event
|
||||||
}),
|
}),
|
||||||
user_id,
|
user_id,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue