mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-09-30 18:42:05 +00:00
fix(hydra): Correctly create short state hash for <v12 rooms
This commit is contained in:
parent
4ed19a1630
commit
ff92573103
2 changed files with 11 additions and 2 deletions
|
@ -632,6 +632,7 @@ pub(super) async fn force_set_room_state_from_server(
|
|||
.add_pdu_outlier(&event_id, &value);
|
||||
}
|
||||
|
||||
info!("Resolving new room state");
|
||||
let new_room_state = self
|
||||
.services
|
||||
.rooms
|
||||
|
@ -639,7 +640,7 @@ pub(super) async fn force_set_room_state_from_server(
|
|||
.resolve_state(&room_id, &room_version, state)
|
||||
.await?;
|
||||
|
||||
info!("Forcing new room state");
|
||||
info!("Compressing new room state");
|
||||
let HashSetCompressStateEvent {
|
||||
shortstatehash: short_state_hash,
|
||||
added,
|
||||
|
@ -653,6 +654,7 @@ pub(super) async fn force_set_room_state_from_server(
|
|||
|
||||
let state_lock = self.services.rooms.state.mutex.lock(&*room_id).await;
|
||||
|
||||
info!("Forcing new room state");
|
||||
self.services
|
||||
.rooms
|
||||
.state
|
||||
|
|
|
@ -177,7 +177,14 @@ pub(crate) async fn create_room_route(
|
|||
};
|
||||
|
||||
let state_lock = match room_id.clone() {
|
||||
| Some(room_id) => services.rooms.state.mutex.lock(&room_id).await,
|
||||
| Some(room_id) => {
|
||||
let _short_id = services
|
||||
.rooms
|
||||
.short
|
||||
.get_or_create_shortroomid(&room_id)
|
||||
.await;
|
||||
services.rooms.state.mutex.lock(&room_id).await
|
||||
},
|
||||
| None => {
|
||||
let temp_room_id = RoomId::new(services.globals.server_name());
|
||||
trace!("Locking temporary room state mutex for {temp_room_id}");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue