fix(pangea_token_model): don't give activities on tokens you just use… (#1856)
* fix(pangea_token_model): don't give activities on tokens you just used in a message * generated * generated --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: ggurdin <46800240+ggurdin@users.noreply.github.com>
This commit is contained in:
parent
fbf8abd987
commit
14dc4ed187
1 changed files with 8 additions and 0 deletions
|
|
@ -354,6 +354,14 @@ class PangeaToken {
|
|||
return false;
|
||||
}
|
||||
|
||||
// if last used less than 1 day ago, return false
|
||||
// this is largely to account for cases of sending a message with some
|
||||
// error that gets you negative points for it
|
||||
if (vocabConstruct.lastUsed != null &&
|
||||
DateTime.now().difference(vocabConstruct.lastUsed!).inDays < 1) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isContentWord) {
|
||||
return vocabConstruct.points < 1;
|
||||
} else if (canBeDefined) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue