fix: various improvements and fixes
This commit is contained in:
parent
363c629faf
commit
3ea7d162db
9 changed files with 67 additions and 57 deletions
|
@ -469,7 +469,7 @@ async fn send_notice(
|
|||
name: &str,
|
||||
) -> Result<()> {
|
||||
// TODO: email
|
||||
if pusher.kind == Some(PusherKind::Http) {
|
||||
if pusher.kind == Some(PusherKind::Email) {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
|
|
@ -1524,7 +1524,7 @@ impl Rooms {
|
|||
let mut aliasid = room_id.as_bytes().to_vec();
|
||||
aliasid.push(0xff);
|
||||
aliasid.extend_from_slice(&globals.next_count()?.to_be_bytes());
|
||||
self.aliasid_alias.insert(aliasid, &*alias.alias())?;
|
||||
self.aliasid_alias.insert(aliasid, &*alias.as_bytes())?;
|
||||
} else {
|
||||
// room_id=None means remove alias
|
||||
let room_id = self
|
||||
|
|
|
@ -108,7 +108,6 @@ impl Sending {
|
|||
|
||||
let mut subscriber = servernamepduids.watch_prefix(b"");
|
||||
loop {
|
||||
println!(".");
|
||||
select! {
|
||||
Some(response) = futures.next() => {
|
||||
match response {
|
||||
|
@ -262,8 +261,6 @@ impl Sending {
|
|||
servercurrentpdus.insert(&key, &[]).unwrap();
|
||||
servernamepduids.remove(&key).unwrap();
|
||||
|
||||
dbg!("there is a future");
|
||||
|
||||
futures.push(
|
||||
Self::handle_event(
|
||||
outgoing_kind,
|
||||
|
@ -292,7 +289,6 @@ impl Sending {
|
|||
|
||||
#[tracing::instrument(skip(self))]
|
||||
pub fn send_pdu(&self, server: &ServerName, pdu_id: &[u8]) -> Result<()> {
|
||||
dbg!(&server);
|
||||
let mut key = server.as_bytes().to_vec();
|
||||
key.push(0xff);
|
||||
key.extend_from_slice(pdu_id);
|
||||
|
@ -350,7 +346,6 @@ impl Sending {
|
|||
.collect::<Vec<_>>();
|
||||
let permit = db.sending.maximum_requests.acquire().await;
|
||||
|
||||
error!("sending pdus to {}: {:#?}", server, pdu_jsons);
|
||||
let response = appservice_server::send_request(
|
||||
&db.globals,
|
||||
db.appservice
|
||||
|
@ -458,7 +453,6 @@ impl Sending {
|
|||
|
||||
let permit = db.sending.maximum_requests.acquire().await;
|
||||
|
||||
error!("sending pdu to {}: {:#?}", userid, pdu);
|
||||
let _response = pusher::send_push_notice(
|
||||
&userid,
|
||||
unread,
|
||||
|
@ -506,7 +500,6 @@ impl Sending {
|
|||
|
||||
let permit = db.sending.maximum_requests.acquire().await;
|
||||
|
||||
error!("sending pdus to {}: {:#?}", server, pdu_jsons);
|
||||
let response = server_server::send_request(
|
||||
&db.globals,
|
||||
&*server,
|
||||
|
@ -523,7 +516,7 @@ impl Sending {
|
|||
)
|
||||
.await
|
||||
.map(|response| {
|
||||
error!("server response: {:?}", response);
|
||||
info!("server response: {:?}", response);
|
||||
kind.clone()
|
||||
})
|
||||
.map_err(|e| (kind, e));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue