-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
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
- Use the
lastCheckInfield in each user's document to track their most recent login time. - On user login, update the
lastCheckInfield in their user document to the current server timestamp. - For each group chat, retrieve the list of member user IDs.
- For each member, fetch their
lastCheckIntimestamp from the database. - Count the number of members whose
lastCheckIntimestamp is within the past hour. - Display this dynamic count as the active member count in the group chat UI.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers