From 457683ea9be4b08fbdfd47e6d456be375ab798df Mon Sep 17 00:00:00 2001 From: IAmTomahawkx Date: Wed, 27 Nov 2024 10:10:02 -0800 Subject: [PATCH] fix: other changes Signed-off-by: IAmTomahawkx --- .../pushd/src/consumers/inbound/internal.rs | 10 ---------- .../pushd/src/consumers/outbound/vapid.rs | 19 ------------------- 2 files changed, 29 deletions(-) diff --git a/crates/daemons/pushd/src/consumers/inbound/internal.rs b/crates/daemons/pushd/src/consumers/inbound/internal.rs index 90430932c..387c08b52 100644 --- a/crates/daemons/pushd/src/consumers/inbound/internal.rs +++ b/crates/daemons/pushd/src/consumers/inbound/internal.rs @@ -43,19 +43,9 @@ pub(crate) async fn publish_message( } if let Some(chnl) = channel { - //if let Err(err) = chnl.basic_publish(BasicProperties::default(), payload.clone(), args.clone()) .await .unwrap(); - // { - // match err { - // Error::InternalChannelError(_) => { - // self.make_channel().await; - // self.publish_message(payload, args, attempt + 1).await; - // } - // _ => {} - // } - // } debug!("Sent message to queue for target {}", routing_key); } else { warn!("Failed to unwrap channel (including attempt to make a channel)!") diff --git a/crates/daemons/pushd/src/consumers/outbound/vapid.rs b/crates/daemons/pushd/src/consumers/outbound/vapid.rs index 1d386c1a4..fb735d5eb 100644 --- a/crates/daemons/pushd/src/consumers/outbound/vapid.rs +++ b/crates/daemons/pushd/src/consumers/outbound/vapid.rs @@ -20,25 +20,6 @@ pub struct VapidOutboundConsumer { pkey: Vec, } -// impl VapidOutboundConsumer { -// fn format_title(&self, notification: &PushNotification) -> String { -// // ideally this changes depending on context -// // in a server, it would look like "Sendername, #channelname in servername" -// // in a group, it would look like "Sendername in groupname" -// // in a dm it should just be "Sendername". -// // not sure how feasible all those are given the PushNotification object as it currently stands. - -// match ¬ification.channel { -// Channel::DirectMessage { .. } => notification.author.clone(), -// Channel::Group { name, .. } => format!("{}, #{}", notification.author, name), -// Channel::TextChannel { name, .. } | Channel::VoiceChannel { name, .. } => { -// format!("{} in #{}", notification.author, name) -// } -// _ => "Unknown".to_string(), -// } -// } -// } - impl VapidOutboundConsumer { pub async fn new(db: Database) -> Result { let config = revolt_config::config().await;