Enabling users without a timeout to add karma.

This commit is contained in:
sergiotarxz 2022-02-10 00:39:11 +01:00
parent c119638dad
commit 2f2f86316c

View File

@ -37,7 +37,7 @@ sub can_modify_karma {
return 1;
}
return DateTime->now >
$self->last_karma_given_date->clone->add( minutes => 1 );
$self->last_karma_given_date->add( minutes => 1 );
}
sub first_name {
@ -81,7 +81,10 @@ sub id_user {
if ( defined $last_karma_given_date ) {
$self->{last_karma_given_date} = $last_karma_given_date;
}
return $self->{last_karma_given_date}->clone;
if ( defined $self->{last_karma_given_date} ) {
return $self->{last_karma_given_date}->clone;
}
return undef;
}
}