Overview
The current implementation sets the number of active members in group chats to a static value of 5. To enhance accuracy and reflect real-time activity, this count should be dynamically determined based on how many group members have logged in within the last hour. This will be achieved by utilizing the existing user schema in Firebase, specifically the lastCheckIn timestamp field.
To-Do
Overview
The current implementation sets the number of active members in group chats to a static value of 5. To enhance accuracy and reflect real-time activity, this count should be dynamically determined based on how many group members have logged in within the last hour. This will be achieved by utilizing the existing user schema in Firebase, specifically the
lastCheckIntimestamp field.To-Do
lastCheckInfield in each user's document to track their most recent login time.lastCheckInfield in their user document to the current server timestamp.lastCheckIntimestamp from the database.lastCheckIntimestamp is within the past hour.