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-07-31 21:28:18 -07:00
committed by npub1w85l93z2dyetvaev42kvmgv3r5qsgc7rutrvgpqshqefj4sydqqskwstfm
parent 1459c2bf0e
commit 177c2adaa2

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) {