fix(acp): satisfy inbound denial lint gates

Co-authored-by: Tom Brow <tomb@block.xyz>
Signed-off-by: Tom Brow <tomb@block.xyz>
This commit is contained in:
npub1tquskdu6yc4h8l7xxtceculxw600grekeq0xg2ukqfrwl7vrzg3quz3gmp
2026-08-02 16:51:32 -07:00
co-authored by Tom Brow
parent 1459c2bf0e
commit 177c2adaa2
+2 -3
View File
@@ -30,7 +30,6 @@ pub(crate) enum GateOutcome {
///
/// Keeping all four inputs as values makes every branch directly testable. The
/// caller must publish only for [`GateOutcome::DropAndDeny`].
#[must_use]
pub(crate) fn classify_inbound(
allowed: bool,
mentioned: bool,
@@ -155,10 +154,10 @@ impl DenialLimiter {
self.prune(now);
let author_key = (channel_id, author.to_string());
!self.by_author.contains_key(&author_key)
&& !self
&& self
.by_channel
.get(&channel_id)
.is_some_and(|sent_at| sent_at.len() >= DENIALS_PER_CHANNEL_PER_WINDOW)
.is_none_or(|sent_at| sent_at.len() < DENIALS_PER_CHANNEL_PER_WINDOW)
}
fn record_at(&mut self, channel_id: Uuid, author: &str, now: Instant) {