@@ -1,8 +1,8 @@
|
||||
use conduwuit::{Err, Result, debug, implement, trace, warn};
|
||||
use ruma::{
|
||||
RoomId, ServerName,
|
||||
events::{StateEventType, room::server_acl::RoomServerAclEventContent},
|
||||
};
|
||||
use tuwunel_core::{Err, Result, debug, implement, trace, warn};
|
||||
|
||||
/// Returns Ok if the acl allows the server
|
||||
#[implement(super::Service)]
|
||||
|
||||
@@ -3,13 +3,13 @@ use std::{
|
||||
time::Instant,
|
||||
};
|
||||
|
||||
use conduwuit::{
|
||||
PduEvent, debug, debug_error, debug_warn, implement, pdu, trace,
|
||||
utils::continue_exponential_backoff_secs, warn,
|
||||
};
|
||||
use ruma::{
|
||||
CanonicalJsonValue, OwnedEventId, RoomId, ServerName, api::federation::event::get_event,
|
||||
};
|
||||
use tuwunel_core::{
|
||||
PduEvent, debug, debug_error, debug_warn, implement, pdu, trace,
|
||||
utils::continue_exponential_backoff_secs, warn,
|
||||
};
|
||||
|
||||
use super::get_room_version_id;
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
use std::collections::{BTreeMap, HashMap, HashSet, VecDeque};
|
||||
|
||||
use conduwuit::{
|
||||
PduEvent, Result, debug_warn, err, implement,
|
||||
state_res::{self},
|
||||
};
|
||||
use futures::{FutureExt, future};
|
||||
use ruma::{
|
||||
CanonicalJsonValue, MilliSecondsSinceUnixEpoch, OwnedEventId, RoomId, ServerName, UInt, int,
|
||||
uint,
|
||||
};
|
||||
use tuwunel_core::{
|
||||
PduEvent, Result, debug_warn, err, implement,
|
||||
state_res::{self},
|
||||
};
|
||||
|
||||
use super::check_room_id;
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
use std::collections::{HashMap, hash_map};
|
||||
|
||||
use conduwuit::{Err, Error, PduEvent, Result, debug, debug_warn, implement};
|
||||
use futures::FutureExt;
|
||||
use ruma::{
|
||||
EventId, OwnedEventId, RoomId, ServerName, api::federation::event::get_room_state_ids,
|
||||
events::StateEventType,
|
||||
};
|
||||
use tuwunel_core::{Err, Error, PduEvent, Result, debug, debug_warn, implement};
|
||||
|
||||
use crate::rooms::short::ShortStateKey;
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ use std::{
|
||||
time::Instant,
|
||||
};
|
||||
|
||||
use conduwuit::{
|
||||
Err, Result, debug, debug::INFO_SPAN_LEVEL, defer, err, implement, utils::stream::IterStream,
|
||||
warn,
|
||||
};
|
||||
use futures::{
|
||||
FutureExt, TryFutureExt, TryStreamExt,
|
||||
future::{OptionFuture, try_join5},
|
||||
};
|
||||
use ruma::{CanonicalJsonValue, EventId, RoomId, ServerName, UserId, events::StateEventType};
|
||||
use tuwunel_core::{
|
||||
Err, Result, debug, debug::INFO_SPAN_LEVEL, defer, err, implement, utils::stream::IterStream,
|
||||
warn,
|
||||
};
|
||||
|
||||
use crate::rooms::timeline::RawPduId;
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
use std::collections::{BTreeMap, HashMap, hash_map};
|
||||
|
||||
use conduwuit::{
|
||||
Err, Error, PduEvent, Result, debug, debug_info, err, implement, state_res, trace, warn,
|
||||
};
|
||||
use futures::future::ready;
|
||||
use ruma::{
|
||||
CanonicalJsonObject, CanonicalJsonValue, EventId, RoomId, ServerName,
|
||||
api::client::error::ErrorKind, events::StateEventType,
|
||||
};
|
||||
use tuwunel_core::{
|
||||
Err, Error, PduEvent, Result, debug, debug_info, err, implement, state_res, trace, warn,
|
||||
};
|
||||
|
||||
use super::{check_room_id, get_room_version_id, to_room_version};
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
use std::{collections::BTreeMap, time::Instant};
|
||||
|
||||
use conduwuit::{
|
||||
use ruma::{CanonicalJsonValue, EventId, RoomId, ServerName, UInt};
|
||||
use tuwunel_core::{
|
||||
Err, PduEvent, Result, debug, debug::INFO_SPAN_LEVEL, defer, implement,
|
||||
utils::continue_exponential_backoff_secs,
|
||||
};
|
||||
use ruma::{CanonicalJsonValue, EventId, RoomId, ServerName, UInt};
|
||||
|
||||
#[implement(super::Service)]
|
||||
#[allow(clippy::type_complexity)]
|
||||
|
||||
@@ -18,11 +18,11 @@ use std::{
|
||||
};
|
||||
|
||||
use async_trait::async_trait;
|
||||
use conduwuit::{Err, PduEvent, Result, RoomVersion, Server, utils::MutexMap};
|
||||
use ruma::{
|
||||
OwnedEventId, OwnedRoomId, RoomId, RoomVersionId,
|
||||
events::room::create::RoomCreateEventContent,
|
||||
};
|
||||
use tuwunel_core::{Err, PduEvent, Result, RoomVersion, Server, utils::MutexMap};
|
||||
|
||||
use crate::{Dep, globals, rooms, sending, server_keys};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
use conduwuit::{Result, err, implement, pdu::gen_event_id_canonical_json, result::FlatOk};
|
||||
use ruma::{CanonicalJsonObject, CanonicalJsonValue, OwnedEventId, OwnedRoomId};
|
||||
use serde_json::value::RawValue as RawJsonValue;
|
||||
use tuwunel_core::{Result, err, implement, pdu::gen_event_id_canonical_json, result::FlatOk};
|
||||
|
||||
type Parsed = (OwnedRoomId, OwnedEventId, CanonicalJsonObject);
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ use std::{
|
||||
sync::Arc,
|
||||
};
|
||||
|
||||
use conduwuit::{
|
||||
use futures::{FutureExt, StreamExt, TryFutureExt, TryStreamExt, future::try_join};
|
||||
use ruma::{OwnedEventId, RoomId, RoomVersionId};
|
||||
use tuwunel_core::{
|
||||
Error, Result, err, implement,
|
||||
state_res::{self, StateMap},
|
||||
trace,
|
||||
utils::stream::{IterStream, ReadyExt, TryWidebandExt, WidebandExt, automatic_width},
|
||||
};
|
||||
use futures::{FutureExt, StreamExt, TryFutureExt, TryStreamExt, future::try_join};
|
||||
use ruma::{OwnedEventId, RoomId, RoomVersionId};
|
||||
|
||||
use crate::rooms::state_compressor::CompressedState;
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ use std::{
|
||||
iter::Iterator,
|
||||
};
|
||||
|
||||
use conduwuit::{
|
||||
use futures::{FutureExt, StreamExt, TryFutureExt, TryStreamExt, future::try_join};
|
||||
use ruma::{OwnedEventId, RoomId, RoomVersionId};
|
||||
use tuwunel_core::{
|
||||
Result, debug, err, implement,
|
||||
matrix::{PduEvent, StateMap},
|
||||
trace,
|
||||
utils::stream::{BroadbandExt, IterStream, ReadyExt, TryBroadbandExt, TryWidebandExt},
|
||||
};
|
||||
use futures::{FutureExt, StreamExt, TryFutureExt, TryStreamExt, future::try_join};
|
||||
use ruma::{OwnedEventId, RoomId, RoomVersionId};
|
||||
|
||||
use crate::rooms::short::ShortStateHash;
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
use std::{borrow::Borrow, collections::BTreeMap, iter::once, sync::Arc, time::Instant};
|
||||
|
||||
use conduwuit::{
|
||||
use futures::{FutureExt, StreamExt, future::ready};
|
||||
use ruma::{CanonicalJsonValue, RoomId, ServerName, events::StateEventType};
|
||||
use tuwunel_core::{
|
||||
Err, Result, debug, debug_info, err, implement,
|
||||
matrix::{EventTypeExt, PduEvent, StateKey, state_res},
|
||||
trace,
|
||||
utils::stream::{BroadbandExt, ReadyExt},
|
||||
warn,
|
||||
};
|
||||
use futures::{FutureExt, StreamExt, future::ready};
|
||||
use ruma::{CanonicalJsonValue, RoomId, ServerName, events::StateEventType};
|
||||
|
||||
use super::{get_room_version_id, to_room_version};
|
||||
use crate::rooms::{
|
||||
|
||||
Reference in New Issue
Block a user