1
0
Fork 0
mirror of https://gitlab.com/famedly/conduit.git synced 2024-12-28 07:04:34 +01:00

Merge branch 'next' into 'next'

Fix wrong associated type in OutgoingKind::Appservice

See merge request famedly/conduit!324
This commit is contained in:
Timo Kösters 2022-04-03 19:48:25 +00:00
commit 1ce03059a0

View file

@ -38,7 +38,7 @@ use super::abstraction::Tree;
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum OutgoingKind {
Appservice(Box<ServerName>),
Appservice(String),
Push(Vec<u8>, Vec<u8>), // user and pushkey
Normal(Box<ServerName>),
}
@ -505,7 +505,7 @@ impl Sending {
let db = db.read().await;
match &kind {
OutgoingKind::Appservice(server) => {
OutgoingKind::Appservice(id) => {
let mut pdu_jsons = Vec::new();
for event in &events {
@ -535,7 +535,7 @@ impl Sending {
let response = appservice_server::send_request(
&db.globals,
db.appservice
.get_registration(server.as_str())
.get_registration(&id)
.map_err(|e| (kind.clone(), e))?
.ok_or_else(|| {
(
@ -756,9 +756,7 @@ impl Sending {
})?;
(
OutgoingKind::Appservice(ServerName::parse(server).map_err(|_| {
Error::bad_database("Invalid server string in server_currenttransaction")
})?),
OutgoingKind::Appservice(server),
if value.is_empty() {
SendingEventType::Pdu(event.to_vec())
} else {