diff options
author | David Gay <david@davidgay.org> | 2021-06-23 20:32:12 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-06-23 20:32:12 -0400 |
commit | c32b8415d06776a336b17dabea142fa03ec8b8fd (patch) | |
tree | 528e766838da668126501016246f625c3cfdf56f /app | |
parent | 18bed0ce80b608b8188abae137175f07c3659bb2 (diff) |
Stop activity when character starts resting, to prevent potential exploit of gaining rested time while timer runs down
Diffstat (limited to 'app')
-rw-r--r-- | app/models/character.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/character.rb b/app/models/character.rb index 2f4ad62..a7d5829 100644 --- a/app/models/character.rb +++ b/app/models/character.rb @@ -339,6 +339,7 @@ class Character < ApplicationRecord def start_resting return false if self.started_resting_at + stop_activity self.update(started_resting_at: Time.now) end |