Fix partial v3 syncs on post-timeout pass; fix partial state on room join.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -111,6 +111,7 @@ pub(crate) async fn create_room_route(
|
||||
.short
|
||||
.get_or_create_shortroomid(&room_id)
|
||||
.await;
|
||||
|
||||
let state_lock = services.rooms.state.mutex.lock(&room_id).await;
|
||||
|
||||
let alias: Option<OwnedRoomAliasId> = match body.room_alias_name.as_ref() {
|
||||
@@ -187,6 +188,10 @@ pub(crate) async fn create_room_route(
|
||||
},
|
||||
};
|
||||
|
||||
// Increment and hold the counter; the room will sync atomically to clients
|
||||
// which is preferable.
|
||||
let next_count = services.globals.next_count();
|
||||
|
||||
// 1. The room create event
|
||||
services
|
||||
.rooms
|
||||
@@ -425,8 +430,10 @@ pub(crate) async fn create_room_route(
|
||||
.await?;
|
||||
}
|
||||
|
||||
// 8. Events implied by invite (and TODO: invite_3pid)
|
||||
drop(next_count);
|
||||
drop(state_lock);
|
||||
|
||||
// 8. Events implied by invite (and TODO: invite_3pid)
|
||||
for user_id in &body.invite {
|
||||
if services
|
||||
.users
|
||||
|
||||
Reference in New Issue
Block a user