Create model function to update user last active date

This commit is contained in:
Mouse Reeve
2021-09-22 08:35:20 -07:00
parent 5ad315faac
commit 2419942770
4 changed files with 9 additions and 11 deletions

View File

@ -195,6 +195,11 @@ class User(OrderedCollectionPageMixin, AbstractUser):
queryset = queryset.exclude(blocks=viewer)
return queryset
def update_active_date(self):
"""this user is here! they are doing things!"""
self.last_active_date = timezone.now()
self.save(broadcast=False, update_fields=["last_active_date"])
def to_outbox(self, filter_type=None, **kwargs):
"""an ordered collection of statuses"""
if filter_type: