mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-11-04 17:29:14 +01:00
fix: add warning for strange bug
This commit is contained in:
parent
f0ac7ed933
commit
56e5d5e3d2
1 changed files with 6 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
||||||
use crate::{database::DatabaseGuard, ConduitResult, Database, Error, Result, Ruma, RumaResponse};
|
use crate::{database::DatabaseGuard, ConduitResult, Database, Error, Result, Ruma, RumaResponse};
|
||||||
use log::error;
|
use log::{error, warn};
|
||||||
use ruma::{
|
use ruma::{
|
||||||
api::client::r0::{sync::sync_events, uiaa::UiaaResponse},
|
api::client::r0::{sync::sync_events, uiaa::UiaaResponse},
|
||||||
events::{room::member::MembershipState, AnySyncEphemeralRoomEvent, EventType},
|
events::{room::member::MembershipState, AnySyncEphemeralRoomEvent, EventType},
|
||||||
|
@ -262,9 +262,12 @@ async fn sync_helper(
|
||||||
db.rooms
|
db.rooms
|
||||||
.pdu_shortstatehash(&pdu.1.event_id)
|
.pdu_shortstatehash(&pdu.1.event_id)
|
||||||
.transpose()
|
.transpose()
|
||||||
.expect("all pdus have state")
|
.ok_or_else(|| {
|
||||||
|
warn!("PDU without state: {}", pdu.1.event_id);
|
||||||
|
Error::bad_database("Found PDU without state")
|
||||||
|
})
|
||||||
})
|
})
|
||||||
.transpose()?;
|
.transpose()?.transpose()?;
|
||||||
|
|
||||||
// Calculates joined_member_count, invited_member_count and heroes
|
// Calculates joined_member_count, invited_member_count and heroes
|
||||||
let calculate_counts = || {
|
let calculate_counts = || {
|
||||||
|
|
Loading…
Reference in a new issue