Restrict accounts to min 30 days to be able to call and start working on masks

This commit is contained in:
2025-08-23 19:56:50 -03:00
parent 134d4e8879
commit 2a2ffd8894
14 changed files with 368 additions and 20 deletions
+17 -6
View File
@@ -14,7 +14,7 @@ use crate::{
},
groups::calls::{
get_display_profile,
permissions::NotBannedPermission,
permissions::{NonNewAccountPermission, NotBannedPermission},
strings::{
get_string_call_answered, get_string_call_hangup_other_party,
get_string_call_hangup_this_party, get_string_call_no_answer,
@@ -53,7 +53,10 @@ impl Command<State, Extras> for CallCommand {
}
fn permissions(&self) -> Vec<Box<dyn Permission<State, Extras> + Send + Sync + 'static>> {
vec![Box::new(NotBannedPermission)]
vec![
Box::new(NotBannedPermission),
Box::new(NonNewAccountPermission),
]
}
async fn execute(
@@ -146,7 +149,10 @@ impl Command<State, Extras> for SkipCommand {
}
fn permissions(&self) -> Vec<Box<dyn Permission<State, Extras> + Send + Sync + 'static>> {
vec![Box::new(NotBannedPermission)]
vec![
Box::new(NotBannedPermission),
Box::new(NonNewAccountPermission),
]
}
async fn execute(
@@ -254,7 +260,10 @@ impl Command<State, Extras> for HangupCommand {
}
fn permissions(&self) -> Vec<Box<dyn Permission<State, Extras> + Send + Sync + 'static>> {
vec![Box::new(NotBannedPermission)]
vec![
Box::new(NotBannedPermission),
Box::new(NonNewAccountPermission),
]
}
async fn execute(
@@ -354,7 +363,10 @@ impl Command<State, Extras> for FriendRequestCommand {
}
fn permissions(&self) -> Vec<Box<dyn Permission<State, Extras> + Send + Sync + 'static>> {
vec![Box::new(NotBannedPermission)]
vec![
Box::new(NotBannedPermission),
Box::new(NonNewAccountPermission),
]
}
async fn execute(
@@ -494,7 +506,6 @@ impl Command<State, Extras> for MaskCommand {
};
if let Some(call_id) = channel.call_id {
} else {
ctx
.send()