Merge branch 'Nyaaori/rejoin-fix' into 'next'
Rejoin over federation if we are not participating See merge request famedly/conduit!399
This commit is contained in:
commit
b1991c8f4f
2 changed files with 7 additions and 4 deletions
|
@ -474,8 +474,12 @@ async fn join_room_by_id_helper(
|
||||||
);
|
);
|
||||||
let state_lock = mutex_state.lock().await;
|
let state_lock = mutex_state.lock().await;
|
||||||
|
|
||||||
// Ask a remote server if we don't have this room
|
// Ask a remote server if we are not participating in this room
|
||||||
if !services().rooms.metadata.exists(room_id)? {
|
if !services()
|
||||||
|
.rooms
|
||||||
|
.state_cache
|
||||||
|
.server_in_room(services().globals.server_name(), room_id)?
|
||||||
|
{
|
||||||
let mut make_join_response_and_server = Err(Error::BadServerResponse(
|
let mut make_join_response_and_server = Err(Error::BadServerResponse(
|
||||||
"No server available to assist in joining.",
|
"No server available to assist in joining.",
|
||||||
));
|
));
|
||||||
|
|
|
@ -108,8 +108,7 @@ impl service::rooms::state_cache::Data for KeyValueDatabase {
|
||||||
joinedcount += 1;
|
joinedcount += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for invited in self.room_members_invited(room_id).filter_map(|r| r.ok()) {
|
for _invited in self.room_members_invited(room_id).filter_map(|r| r.ok()) {
|
||||||
joined_servers.insert(invited.server_name().to_owned());
|
|
||||||
invitedcount += 1;
|
invitedcount += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue