feat: incoming invites over federation

This commit is contained in:
Timo Kösters 2021-04-11 21:01:27 +02:00
parent b0ea692706
commit 8773e5013d
No known key found for this signature in database
GPG key ID: 24DA7517711A2BA4
10 changed files with 307 additions and 146 deletions

View file

@ -599,6 +599,8 @@ async fn join_room_by_id_helper(
Error::BadServerResponse("Invalid user id in send_join response.")
})?;
let invite_state = Vec::new(); // TODO add a few important events
// Update our membership info, we do this here incase a user is invited
// and immediately leaves we need the DB to record the invite event for auth
db.rooms.update_membership(
@ -616,6 +618,7 @@ async fn join_room_by_id_helper(
Error::BadServerResponse("Invalid membership state content.")
})?,
&pdu.sender,
Some(invite_state),
&db.account_data,
&db.globals,
)?;