added a tolerance to the natural processor so that 'now' works again

This commit is contained in:
jude 2020-11-07 00:44:36 +00:00
parent 5d4bed30ae
commit 2a637ee9c9
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View File

@ -1175,7 +1175,7 @@ dependencies = [
[[package]]
name = "reminder_rs"
version = "1.1.9"
version = "1.1.10"
dependencies = [
"Inflector",
"async-trait",

View File

@ -1,6 +1,6 @@
[package]
name = "reminder_rs"
version = "1.1.9"
version = "1.1.10"
authors = ["jellywx <judesouthworth@pm.me>"]
edition = "2018"

View File

@ -1311,7 +1311,7 @@ async fn create_reminder<T: TryInto<i64>, S: ToString + Type<MySql> + Encode<MyS
.unwrap()
.as_secs() as i64;
if time >= unix_time {
if time >= unix_time - 10 {
if time > unix_time + *MAX_TIME {
Err(ReminderError::LongTime)
} else {