mirror of
https://gitlab.com/famedly/conduit.git
synced 2024-09-06 04:35:25 +02:00
Merge branch 'next' into 'next'
Fix wrong associated type in OutgoingKind::Appservice See merge request famedly/conduit!324
This commit is contained in:
commit
1ce03059a0
1 changed files with 4 additions and 6 deletions
|
@ -38,7 +38,7 @@ use super::abstraction::Tree;
|
||||||
|
|
||||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||||
pub enum OutgoingKind {
|
pub enum OutgoingKind {
|
||||||
Appservice(Box<ServerName>),
|
Appservice(String),
|
||||||
Push(Vec<u8>, Vec<u8>), // user and pushkey
|
Push(Vec<u8>, Vec<u8>), // user and pushkey
|
||||||
Normal(Box<ServerName>),
|
Normal(Box<ServerName>),
|
||||||
}
|
}
|
||||||
|
@ -505,7 +505,7 @@ impl Sending {
|
||||||
let db = db.read().await;
|
let db = db.read().await;
|
||||||
|
|
||||||
match &kind {
|
match &kind {
|
||||||
OutgoingKind::Appservice(server) => {
|
OutgoingKind::Appservice(id) => {
|
||||||
let mut pdu_jsons = Vec::new();
|
let mut pdu_jsons = Vec::new();
|
||||||
|
|
||||||
for event in &events {
|
for event in &events {
|
||||||
|
@ -535,7 +535,7 @@ impl Sending {
|
||||||
let response = appservice_server::send_request(
|
let response = appservice_server::send_request(
|
||||||
&db.globals,
|
&db.globals,
|
||||||
db.appservice
|
db.appservice
|
||||||
.get_registration(server.as_str())
|
.get_registration(&id)
|
||||||
.map_err(|e| (kind.clone(), e))?
|
.map_err(|e| (kind.clone(), e))?
|
||||||
.ok_or_else(|| {
|
.ok_or_else(|| {
|
||||||
(
|
(
|
||||||
|
@ -756,9 +756,7 @@ impl Sending {
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
(
|
(
|
||||||
OutgoingKind::Appservice(ServerName::parse(server).map_err(|_| {
|
OutgoingKind::Appservice(server),
|
||||||
Error::bad_database("Invalid server string in server_currenttransaction")
|
|
||||||
})?),
|
|
||||||
if value.is_empty() {
|
if value.is_empty() {
|
||||||
SendingEventType::Pdu(event.to_vec())
|
SendingEventType::Pdu(event.to_vec())
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue