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>
pull/1688/head
wcjord 9 months ago committed by GitHub
parent fbf8abd987
commit 14dc4ed187
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -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…
Cancel
Save