mirror of
https://framagit.org/veretcle/oolatoocs.git
synced 2025-07-21 13:24:18 +02:00
feat: add #NoTweet to skip toot from being tweeted
This commit is contained in:
@@ -36,6 +36,12 @@ pub async fn run(config: &Config) {
|
||||
.unwrap_or_else(|e| panic!("Cannot get instance: {}", e));
|
||||
|
||||
for toot in timeline {
|
||||
// detecting tag #NoTweet and skipping the toot
|
||||
if toot.tags.iter().any(|f| &f.name == "notweet") {
|
||||
continue;
|
||||
}
|
||||
|
||||
// form tweet_content and strip everything useless in it
|
||||
let Ok(mut tweet_content) = strip_everything(&toot.content, &toot.tags) else {
|
||||
continue; // skip in case we can’t strip something
|
||||
};
|
||||
|
Reference in New Issue
Block a user