mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-05-26 20:49:55 +00:00
fix(hydra): Correctly create short state hash for <v12 rooms
This commit is contained in:
@@ -632,6 +632,7 @@ pub(super) async fn force_set_room_state_from_server(
|
|||||||
.add_pdu_outlier(&event_id, &value);
|
.add_pdu_outlier(&event_id, &value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info!("Resolving new room state");
|
||||||
let new_room_state = self
|
let new_room_state = self
|
||||||
.services
|
.services
|
||||||
.rooms
|
.rooms
|
||||||
@@ -639,7 +640,7 @@ pub(super) async fn force_set_room_state_from_server(
|
|||||||
.resolve_state(&room_id, &room_version, state)
|
.resolve_state(&room_id, &room_version, state)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
info!("Forcing new room state");
|
info!("Compressing new room state");
|
||||||
let HashSetCompressStateEvent {
|
let HashSetCompressStateEvent {
|
||||||
shortstatehash: short_state_hash,
|
shortstatehash: short_state_hash,
|
||||||
added,
|
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;
|
let state_lock = self.services.rooms.state.mutex.lock(&*room_id).await;
|
||||||
|
|
||||||
|
info!("Forcing new room state");
|
||||||
self.services
|
self.services
|
||||||
.rooms
|
.rooms
|
||||||
.state
|
.state
|
||||||
|
|||||||
@@ -177,7 +177,14 @@ pub(crate) async fn create_room_route(
|
|||||||
};
|
};
|
||||||
|
|
||||||
let state_lock = match room_id.clone() {
|
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 => {
|
| None => {
|
||||||
let temp_room_id = RoomId::new(services.globals.server_name());
|
let temp_room_id = RoomId::new(services.globals.server_name());
|
||||||
trace!("Locking temporary room state mutex for {temp_room_id}");
|
trace!("Locking temporary room state mutex for {temp_room_id}");
|
||||||
|
|||||||
Reference in New Issue
Block a user