add nobot and optout/optin

This commit is contained in:
2021-08-30 20:03:03 +02:00
parent 37a9f323e6
commit 900132970d
7 changed files with 160 additions and 19 deletions
+5 -1
View File
@@ -274,6 +274,8 @@ impl GroupHandle {
return Ok(());
}
// optout does not work for members and admins, so don't check it
if !self.config.is_member_or_admin(&status_user) {
debug!("Status author @{} is not a member, discard", status_user);
return Ok(());
@@ -300,10 +302,12 @@ impl GroupHandle {
'tags: for t in tags {
if self.config.is_tag_followed(&t) {
info!("REBLOG #{} STATUS", &t);
info!("REBLOG #{} STATUS", t);
self.client.reblog(&s.id).await
.log_error("Failed to reblog");
break 'tags; // do not reblog multiple times!
} else {
debug!("#{} is not a group tag", t);
}
}