fix: remove our server from the list of servers to send the event PDU to
This commit is contained in:
parent
1712e63e06
commit
414c7c40c4
|
@ -1957,11 +1957,8 @@ impl Rooms {
|
||||||
// where events in the current room state do not exist
|
// where events in the current room state do not exist
|
||||||
self.set_room_state(room_id, statehashid)?;
|
self.set_room_state(room_id, statehashid)?;
|
||||||
|
|
||||||
let mut servers: HashSet<Box<ServerName>> = self
|
let mut servers: HashSet<Box<ServerName>> =
|
||||||
.room_servers(room_id)
|
self.room_servers(room_id).filter_map(|r| r.ok()).collect();
|
||||||
.filter_map(|r| r.ok())
|
|
||||||
.filter(|server| &**server != db.globals.server_name())
|
|
||||||
.collect();
|
|
||||||
|
|
||||||
// In case we are kicking or banning a user, we need to inform their server of the change
|
// In case we are kicking or banning a user, we need to inform their server of the change
|
||||||
if pdu.kind == EventType::RoomMember {
|
if pdu.kind == EventType::RoomMember {
|
||||||
|
@ -1974,6 +1971,8 @@ impl Rooms {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
servers.remove(db.globals.server_name());
|
||||||
|
|
||||||
db.sending.send_pdu(servers.into_iter(), &pdu_id)?;
|
db.sending.send_pdu(servers.into_iter(), &pdu_id)?;
|
||||||
|
|
||||||
for appservice in db.appservice.all()? {
|
for appservice in db.appservice.all()? {
|
||||||
|
|
Loading…
Reference in New Issue