diff --git a/Cargo.lock b/Cargo.lock index cbbe3d0..8467f71 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2013,7 +2013,7 @@ checksum = "df94ce210e5bc13cb6651479fa48d14f601d9858cfe0467f43ae157023b938d3" [[package]] name = "payphone" -version = "4.4.46" +version = "4.4.47" dependencies = [ "anyhow", "async-trait", diff --git a/Cargo.toml b/Cargo.toml index f6c9ef1..eef2db3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "payphone" -version = "4.4.46" +version = "4.4.47" edition = "2024" default-run = "payphone" diff --git a/playbooks/09-payphone.yml b/playbooks/09-payphone.yml index 8b3237e..3c48744 100644 --- a/playbooks/09-payphone.yml +++ b/playbooks/09-payphone.yml @@ -101,7 +101,7 @@ "--redis-urls", "redis://redis-cluster.redis", "--bot-owner-id", - "1357199907512914051" + "1486270291410817114" ] envFrom: - secretRef: diff --git a/src/groups/calls/permissions.rs b/src/groups/calls/permissions.rs index c3bb9c8..c9f2788 100644 --- a/src/groups/calls/permissions.rs +++ b/src/groups/calls/permissions.rs @@ -50,10 +50,9 @@ pub struct NonNewAccountPermission; #[async_trait] impl Permission for NonNewAccountPermission { async fn check(&self, ctx: &CommandContext) -> Result { - Ok( - UtcDateTime::from_unix_timestamp(ctx.event.author.id.timestamp() / 1000).unwrap() - < UtcDateTime::now() - Duration::days(30), - ) + Ok(ctx.event.author.id.get() == ctx.rt.state.bot_owner_id + || UtcDateTime::from_unix_timestamp(ctx.event.author.id.timestamp() / 1000).unwrap() + < UtcDateTime::now() - Duration::days(30)) } async fn on_handle_denied(