|
|
@ -773,11 +773,11 @@ impl<'a> ProcessMention<'a> { |
|
|
|
// Try to unfollow
|
|
|
|
// Try to unfollow
|
|
|
|
let account = self.client.get_account(id).await?; |
|
|
|
let account = self.client.get_account(id).await?; |
|
|
|
let bio = utils::strip_html(&account.note); |
|
|
|
let bio = utils::strip_html(&account.note); |
|
|
|
if RE_NOBOT_TAG.is_match(&bio) { |
|
|
|
let normalized = normalize_acct(&account.acct, &self.group_acct)?; |
|
|
|
// #nobot
|
|
|
|
if RE_NOBOT_TAG.is_match(&bio) && !self.config.is_member(&normalized) { |
|
|
|
Err(GroupError::UserOptedOut) |
|
|
|
// #nobot in a non-member account
|
|
|
|
|
|
|
|
Err(GroupError::UserOptedOutNobot) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
let normalized = normalize_acct(&account.acct, &self.group_acct)?; |
|
|
|
|
|
|
|
if self.config.is_banned(&normalized) { |
|
|
|
if self.config.is_banned(&normalized) { |
|
|
|
Err(GroupError::UserIsBanned) |
|
|
|
Err(GroupError::UserIsBanned) |
|
|
|
} else if self.config.is_optout(&normalized) { |
|
|
|
} else if self.config.is_optout(&normalized) { |
|
|
|