Move appservice request unit from sender to appservice.
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
mod append;
|
mod append;
|
||||||
mod namespace_regex;
|
mod namespace_regex;
|
||||||
mod registration_info;
|
mod registration_info;
|
||||||
|
pub(crate) mod request;
|
||||||
|
|
||||||
use std::{
|
use std::{
|
||||||
collections::{BTreeMap, HashSet},
|
collections::{BTreeMap, HashSet},
|
||||||
@@ -15,6 +16,7 @@ use tokio::sync::{RwLock, RwLockReadGuard};
|
|||||||
use tuwunel_core::{Err, Result, debug, err, utils::stream::IterStream};
|
use tuwunel_core::{Err, Result, debug, err, utils::stream::IterStream};
|
||||||
use tuwunel_database::Map;
|
use tuwunel_database::Map;
|
||||||
|
|
||||||
|
pub(crate) use self::request::send_request;
|
||||||
pub use self::{namespace_regex::NamespaceRegex, registration_info::RegistrationInfo};
|
pub use self::{namespace_regex::NamespaceRegex, registration_info::RegistrationInfo};
|
||||||
|
|
||||||
pub struct Service {
|
pub struct Service {
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ where
|
|||||||
};
|
};
|
||||||
|
|
||||||
if notify.is_some() {
|
if notify.is_some() {
|
||||||
return Err!(Database(
|
return Err!(Request(BadJson(
|
||||||
r#"Malformed pushrule contains more than one of these actions: ["dont_notify", "notify", "coalesce"]"#
|
r#"Malformed pushrule contains more than one of these actions: ["dont_notify", "notify", "coalesce"]"#
|
||||||
));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
notify = Some(n);
|
notify = Some(n);
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
mod appservice;
|
|
||||||
mod data;
|
mod data;
|
||||||
mod dest;
|
mod dest;
|
||||||
mod sender;
|
mod sender;
|
||||||
@@ -29,7 +28,7 @@ pub use self::{
|
|||||||
dest::Destination,
|
dest::Destination,
|
||||||
sender::{EDU_LIMIT, PDU_LIMIT},
|
sender::{EDU_LIMIT, PDU_LIMIT},
|
||||||
};
|
};
|
||||||
use crate::rooms::timeline::RawPduId;
|
use crate::{appservice, rooms::timeline::RawPduId};
|
||||||
|
|
||||||
pub struct Service {
|
pub struct Service {
|
||||||
pub db: Data,
|
pub db: Data,
|
||||||
|
|||||||
@@ -50,9 +50,8 @@ use tuwunel_core::{
|
|||||||
warn,
|
warn,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{Destination, EduBuf, EduVec, Msg, SendingEvent, Service, data::QueueItem};
|
||||||
Destination, EduBuf, EduVec, Msg, SendingEvent, Service, appservice, data::QueueItem,
|
use crate::appservice;
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
enum TransactionStatus {
|
enum TransactionStatus {
|
||||||
|
|||||||
Reference in New Issue
Block a user