forked from MightyPork/group-actor
readme, some fixes
This commit is contained in:
@@ -17,6 +17,7 @@ use crate::error::GroupError;
|
||||
use crate::store::ConfigStore;
|
||||
use crate::store::data::GroupConfig;
|
||||
use crate::utils::{LogError, normalize_acct, VisExt};
|
||||
use crate::command::StatusCommand;
|
||||
|
||||
mod handle_mention;
|
||||
|
||||
@@ -241,7 +242,7 @@ impl GroupHandle {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Handle a non-mention status
|
||||
/// Handle a non-mention status for tags
|
||||
async fn handle_status(&mut self, s: Status) -> Result<(), GroupError> {
|
||||
debug!("Handling status #{}", s.id);
|
||||
let ts = s.timestamp_millis();
|
||||
@@ -252,11 +253,22 @@ impl GroupHandle {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if s.in_reply_to_id.is_some() {
|
||||
debug!("Status is a reply, discard");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
if !s.content.contains('#') {
|
||||
debug!("No tags in status, discard");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let commands = crate::command::parse_slash_commands(&s.content);
|
||||
if commands.contains(&StatusCommand::Ignore) {
|
||||
debug!("Post has IGNORE command, discard");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let group_user = self.config.get_acct();
|
||||
let status_user = normalize_acct(&s.account.acct, group_user)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user