diff --git a/src/filter.rs b/src/filter.rs index 13a6baa..4e5dd79 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -10,8 +10,8 @@ pub fn filter(message: &Status, tl: &Timeline) -> Result<(), String> { let timelines = &CONFIG.timelines; let filter = &CONFIG.filter; - // Remove Repeats (a.k.a. Boosts) - if message.reblog.is_some() { + // Remove Repeats (a.k.a. Boosts), but pass Quotes + if message.reblog.is_some() && !message.quote { return Err("The message is the repeat".to_owned()); } diff --git a/src/streamer.rs b/src/streamer.rs index 8bac23c..f5143ed 100644 --- a/src/streamer.rs +++ b/src/streamer.rs @@ -2,8 +2,7 @@ use crate::config::CONFIG; use crate::filter; use crate::logger; use crate::utils::{die, die_with_error, success}; -use log::error; -use log::info; +use log::{debug, error, info}; use megalodon::{default::NO_REDIRECT, generator, megalodon::AppInputOptions, streaming::Message}; use std::io; @@ -44,6 +43,7 @@ pub async fn streaming(tl: Timeline) { .listen(Box::new(move |message| { if let Message::Update(mes) = message { info!("Message received."); + debug!("{mes:?}"); let result = filter::filter(&mes, &tl); if let Err(reason) = result { info!("Message did not pass the filter. Reason: {reason}");