You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
Fix sentry transport post-upgrade
This commit is contained in:
@ -14,7 +14,6 @@ pub struct RateLimiter {
|
||||
session: Option<SystemTime>,
|
||||
transaction: Option<SystemTime>,
|
||||
attachment: Option<SystemTime>,
|
||||
profile: Option<SystemTime>,
|
||||
}
|
||||
|
||||
impl RateLimiter {
|
||||
@ -60,7 +59,6 @@ impl RateLimiter {
|
||||
"session" => self.session = new_time,
|
||||
"transaction" => self.transaction = new_time,
|
||||
"attachment" => self.attachment = new_time,
|
||||
"profile" => self.profile = new_time,
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
@ -95,7 +93,6 @@ impl RateLimiter {
|
||||
RateLimitingCategory::Session => self.session,
|
||||
RateLimitingCategory::Transaction => self.transaction,
|
||||
RateLimitingCategory::Attachment => self.attachment,
|
||||
RateLimitingCategory::Profile => self.profile,
|
||||
}?;
|
||||
time_left.duration_since(SystemTime::now()).ok()
|
||||
}
|
||||
@ -119,7 +116,6 @@ impl RateLimiter {
|
||||
}
|
||||
EnvelopeItem::Transaction(_) => RateLimitingCategory::Transaction,
|
||||
EnvelopeItem::Attachment(_) => RateLimitingCategory::Attachment,
|
||||
EnvelopeItem::Profile(_) => RateLimitingCategory::Profile,
|
||||
_ => RateLimitingCategory::Any,
|
||||
})
|
||||
})
|
||||
@ -139,8 +135,6 @@ pub enum RateLimitingCategory {
|
||||
Transaction,
|
||||
/// Rate Limit pertaining to Attachments.
|
||||
Attachment,
|
||||
/// Rate Limit pertaining to Profiles.
|
||||
Profile,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
Reference in New Issue
Block a user