mirror of
https://forgejo.ellis.link/continuwuation/continuwuity/
synced 2026-05-13 08:44:53 +00:00
style: Reformat
This commit is contained in:
+18
-12
@@ -6,24 +6,24 @@
|
||||
};
|
||||
|
||||
use conduwuit::{
|
||||
debug_error, err, info, matrix::{
|
||||
pdu::{PduEvent, PduId, RawPduId},
|
||||
Err, Result, debug_error, err, info,
|
||||
matrix::{
|
||||
Event,
|
||||
}, trace,
|
||||
utils,
|
||||
pdu::{PduEvent, PduId, RawPduId},
|
||||
},
|
||||
trace, utils,
|
||||
utils::{
|
||||
stream::{IterStream, ReadyExt},
|
||||
string::EMPTY,
|
||||
}, warn,
|
||||
Err,
|
||||
Result,
|
||||
},
|
||||
warn,
|
||||
};
|
||||
use futures::{FutureExt, StreamExt, TryStreamExt};
|
||||
use lettre::message::Mailbox;
|
||||
use ruma::{
|
||||
api::federation::event::get_room_state, events::AnyStateEvent, serde::Raw, CanonicalJsonObject, CanonicalJsonValue,
|
||||
EventId, OwnedEventId, OwnedRoomId, OwnedRoomOrAliasId, OwnedServerName,
|
||||
RoomId, RoomVersionId, UInt,
|
||||
CanonicalJsonObject, CanonicalJsonValue, EventId, OwnedEventId, OwnedRoomId,
|
||||
OwnedRoomOrAliasId, OwnedServerName, RoomId, RoomVersionId, UInt,
|
||||
api::federation::event::get_room_state, events::AnyStateEvent, serde::Raw,
|
||||
};
|
||||
use service::rooms::{
|
||||
short::{ShortEventId, ShortRoomId},
|
||||
@@ -813,7 +813,10 @@ pub(super) async fn force_set_room_state_from_server(
|
||||
.await;
|
||||
|
||||
state.insert(shortstatekey, pdu.event_id.clone());
|
||||
self.services.rooms.pdu_metadata.clear_pdu_markers(pdu.event_id());
|
||||
self.services
|
||||
.rooms
|
||||
.pdu_metadata
|
||||
.clear_pdu_markers(pdu.event_id());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -831,7 +834,10 @@ pub(super) async fn force_set_room_state_from_server(
|
||||
.rooms
|
||||
.outlier
|
||||
.add_pdu_outlier(&event_id, &value);
|
||||
self.services.rooms.pdu_metadata.clear_pdu_markers(&event_id);
|
||||
self.services
|
||||
.rooms
|
||||
.pdu_metadata
|
||||
.clear_pdu_markers(&event_id);
|
||||
}
|
||||
|
||||
info!("Resolving new room state");
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use std::collections::{hash_map, BTreeMap, HashMap};
|
||||
use std::collections::{BTreeMap, HashMap, hash_map};
|
||||
|
||||
use conduwuit::{
|
||||
debug, debug_info, debug_warn, err, implement, state_res, trace, warn, Err, Event,
|
||||
PduEvent, Result,
|
||||
Err, Event, PduEvent, Result, debug, debug_info, debug_warn, err, implement, state_res,
|
||||
trace, warn,
|
||||
};
|
||||
use futures::future::ready;
|
||||
use ruma::{
|
||||
events::StateEventType, CanonicalJsonObject, CanonicalJsonValue, EventId, OwnedEventId, RoomId,
|
||||
ServerName,
|
||||
CanonicalJsonObject, CanonicalJsonValue, EventId, OwnedEventId, RoomId, ServerName,
|
||||
events::StateEventType,
|
||||
};
|
||||
|
||||
use super::{check_room_id, get_room_version_rules};
|
||||
|
||||
@@ -1,46 +1,46 @@
|
||||
use std::{collections::HashMap, sync::Arc};
|
||||
|
||||
use conduwuit::{
|
||||
debug, debug_info, debug_warn, err, error, info, is_true, matrix::{
|
||||
event::{gen_event_id, gen_event_id_canonical_json},
|
||||
Err, Pdu, Result, Server, debug, debug_info, debug_warn, err, error, info, is_true,
|
||||
matrix::{
|
||||
StateKey,
|
||||
}, pdu::PartialPdu, state_res, trace,
|
||||
utils::{self, to_canonical_object, IterStream, ReadyExt},
|
||||
event::{gen_event_id, gen_event_id_canonical_json},
|
||||
},
|
||||
pdu::PartialPdu,
|
||||
state_res, trace,
|
||||
utils::{self, IterStream, ReadyExt, to_canonical_object},
|
||||
warn,
|
||||
Err, Pdu,
|
||||
Result,
|
||||
Server,
|
||||
};
|
||||
use database::Database;
|
||||
use futures::{join, FutureExt, StreamExt, TryFutureExt};
|
||||
use futures::{FutureExt, StreamExt, TryFutureExt, join};
|
||||
use ruma::{
|
||||
CanonicalJsonObject, CanonicalJsonValue, OwnedRoomId, OwnedServerName, OwnedUserId, RoomId,
|
||||
RoomVersionId, UserId,
|
||||
api::{
|
||||
error::{ErrorKind, IncompatibleRoomVersionErrorData},
|
||||
federation,
|
||||
}, canonical_json::to_canonical_value, events::{
|
||||
},
|
||||
canonical_json::to_canonical_value,
|
||||
events::{
|
||||
StateEventType, StaticEventContent,
|
||||
room::{
|
||||
join_rules::RoomJoinRulesEventContent,
|
||||
member::{MembershipState, RoomMemberEventContent},
|
||||
}, StateEventType,
|
||||
StaticEventContent,
|
||||
}, room::{AllowRule, JoinRule}, CanonicalJsonObject, CanonicalJsonValue,
|
||||
OwnedRoomId, OwnedServerName,
|
||||
OwnedUserId,
|
||||
RoomId,
|
||||
RoomVersionId,
|
||||
UserId,
|
||||
},
|
||||
},
|
||||
room::{AllowRule, JoinRule},
|
||||
};
|
||||
|
||||
use crate::{
|
||||
antispam, globals, rooms::{
|
||||
Dep, antispam, globals,
|
||||
rooms::{
|
||||
metadata, outlier, pdu_metadata, short,
|
||||
state::{self, RoomMutexGuard},
|
||||
state_accessor, state_cache,
|
||||
state_compressor::{self, CompressedState, HashSetCompressStateEvent},
|
||||
timeline::{self, pdu_fits},
|
||||
},
|
||||
sending,
|
||||
server_keys, users, Dep,
|
||||
sending, server_keys, users,
|
||||
};
|
||||
|
||||
pub struct Service {
|
||||
|
||||
@@ -4,22 +4,22 @@
|
||||
arrayvec::ArrayVec,
|
||||
matrix::{Event, PduCount},
|
||||
utils::{
|
||||
ReadyExt,
|
||||
stream::{TryIgnore, WidebandExt},
|
||||
u64_from_u8,
|
||||
ReadyExt,
|
||||
},
|
||||
};
|
||||
use database::Map;
|
||||
use futures::{Stream, StreamExt};
|
||||
use ruma::{api::Direction, EventId, RoomId, UserId};
|
||||
use ruma::{EventId, RoomId, UserId, api::Direction};
|
||||
|
||||
use crate::{
|
||||
Dep,
|
||||
rooms::{
|
||||
self,
|
||||
short::{ShortEventId, ShortRoomId},
|
||||
timeline::{PduId, PdusIterItem, RawPduId},
|
||||
},
|
||||
Dep,
|
||||
};
|
||||
|
||||
pub(super) struct Data {
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
mod data;
|
||||
use std::sync::Arc;
|
||||
|
||||
use conduwuit::{matrix::PduCount, Result};
|
||||
use futures::{future::try_join, StreamExt};
|
||||
use ruma::{api::Direction, EventId, RoomId, UserId};
|
||||
use conduwuit::{Result, matrix::PduCount};
|
||||
use futures::{StreamExt, future::try_join};
|
||||
use ruma::{EventId, RoomId, UserId, api::Direction};
|
||||
|
||||
use self::data::Data;
|
||||
use crate::{
|
||||
rooms::{self, timeline::PdusIterItem},
|
||||
Dep,
|
||||
rooms::{self, timeline::PdusIterItem},
|
||||
};
|
||||
|
||||
pub struct Service {
|
||||
|
||||
Reference in New Issue
Block a user