Skip to content

Commit

Permalink
Merge branch 'main' into v2.4.4-remove-logging-file
Browse files Browse the repository at this point in the history
  • Loading branch information
brucewzj99 authored Dec 31, 2024
2 parents 8fdb39f + 4c14264 commit 582bb95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bot/database_service/firestore_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ def get_user_sheet_id(self, telegram_id, telegram_username):
# Get all user IDs
def get_all_user_id(self):
try:
users_ref = self.db.collection(self.collection_name)
two_months_ago = datetime.now() - timedelta(days=45)
users_ref = self.db.collection(self.collection_name).where('last_accessed', '>=', two_months_ago)
user_ids = [int(user.id) for user in users_ref.stream()]
return user_ids
except Exception as e:
Expand Down

0 comments on commit 582bb95

Please sign in to comment.