Skip to content

Commit

Permalink
update last_active more frequently
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed Jan 17, 2024
1 parent ba39dfc commit e80f968
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/users.moon
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ class Users extends Model

update_last_active: =>
span = if @last_active
date.diff(date(true), date(@last_active))\spandays!
date.diff(date(true), date(@last_active))\spanhours!

if not span or span > 1
@update { last_active: db.format_date! }, timestamp: false
Expand Down

0 comments on commit e80f968

Please sign in to comment.