Skip to content

Update group stats in WhatsApp activity tracker - #31

Open
Rukafuu wants to merge 1 commit into
mainfrom
update-whatsapp-group-stats-4353566013691958391
Open

Update group stats in WhatsApp activity tracker#31
Rukafuu wants to merge 1 commit into
mainfrom
update-whatsapp-group-stats-4353566013691958391

Conversation

@Rukafuu

@Rukafuu Rukafuu commented Jun 15, 2026

Copy link
Copy Markdown
Owner

I have implemented the WhatsApp group statistics tracking as requested.

Key changes:

  1. groupStore.js: Added a new updateStats(groupId, type) method that tracks message counts, images, stickers, and commands for each group. I also fixed a missing save() call in the existing updateGroup method.
  2. activityTracker.js: Integrated groupStore into the activity tracking flow. It now correctly identifies stickers (separate from generic images) and updates both user and group statistics.
  3. simpleStore.js: Improved the updateStats implementation to fix a race condition where the user might not be found immediately after being created, and ensured createUser is properly awaited.

I verified these changes by creating a standalone test script that simulated various WhatsApp events and confirmed that both user and group statistics were correctly incremented in their respective JSON stores.


PR created automatically by Jules for task 4353566013691958391 started by @Rukafuu

- Added `updateStats` to `groupStore` to track group-level statistics.
- Updated `activityTracker` to call `groupStore.updateStats` for group events.
- Refined `statType` detection to distinguish between images and stickers.
- Fixed a bug in `simpleStore.updateStats` ensuring `createUser` is awaited and database state is refreshed.
- Fixed a missing `save()` call in `groupStore.updateGroup`.

Co-authored-by: Rukafuu <111822334+Rukafuu@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lira-os Ready Ready Preview, Comment Jun 15, 2026 5:43pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant