mirror of
https://github.com/nostrlabs-io/notepush.git
synced 2025-06-15 03:26:34 +00:00
Remove unused code to fix cargo warnings
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
This commit is contained in:
@ -2,7 +2,6 @@ use super::ExtendedEvent;
|
|||||||
use nostr_sdk::prelude::*;
|
use nostr_sdk::prelude::*;
|
||||||
|
|
||||||
pub struct MuteManager {
|
pub struct MuteManager {
|
||||||
relay_url: String,
|
|
||||||
client: Client,
|
client: Client,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11,7 +10,7 @@ impl MuteManager {
|
|||||||
let client = Client::new(&Keys::generate());
|
let client = Client::new(&Keys::generate());
|
||||||
client.add_relay(relay_url.clone()).await?;
|
client.add_relay(relay_url.clone()).await?;
|
||||||
client.connect().await;
|
client.connect().await;
|
||||||
Ok(MuteManager { relay_url, client })
|
Ok(MuteManager { client })
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn should_mute_notification_for_pubkey(
|
pub async fn should_mute_notification_for_pubkey(
|
||||||
|
@ -19,10 +19,6 @@ use std::fs::File;
|
|||||||
|
|
||||||
pub struct NotificationManager {
|
pub struct NotificationManager {
|
||||||
db: r2d2::Pool<SqliteConnectionManager>,
|
db: r2d2::Pool<SqliteConnectionManager>,
|
||||||
apns_private_key_path: String,
|
|
||||||
apns_private_key_id: String,
|
|
||||||
apns_team_id: String,
|
|
||||||
apns_environment: a2::client::Endpoint,
|
|
||||||
apns_topic: String,
|
apns_topic: String,
|
||||||
apns_client: Client,
|
apns_client: Client,
|
||||||
|
|
||||||
@ -56,10 +52,6 @@ impl NotificationManager {
|
|||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok(Self {
|
Ok(Self {
|
||||||
apns_private_key_path,
|
|
||||||
apns_private_key_id,
|
|
||||||
apns_team_id,
|
|
||||||
apns_environment,
|
|
||||||
apns_topic,
|
apns_topic,
|
||||||
apns_client: client,
|
apns_client: client,
|
||||||
db,
|
db,
|
||||||
@ -209,13 +201,6 @@ impl NotificationManager {
|
|||||||
Ok(relevant_pubkeys)
|
Ok(relevant_pubkeys)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pubkeys_subscribed_to_event(
|
|
||||||
&self,
|
|
||||||
event: &Event,
|
|
||||||
) -> Result<HashSet<PublicKey>, Box<dyn std::error::Error>> {
|
|
||||||
self.pubkeys_subscribed_to_event_id(&event.id)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn pubkeys_subscribed_to_event_id(
|
fn pubkeys_subscribed_to_event_id(
|
||||||
&self,
|
&self,
|
||||||
event_id: &EventId,
|
event_id: &EventId,
|
||||||
|
Reference in New Issue
Block a user