Update group stats in WhatsApp activity tracker - #31
Conversation
- 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>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
I have implemented the WhatsApp group statistics tracking as requested.
Key changes:
groupStore.js: Added a newupdateStats(groupId, type)method that tracks message counts, images, stickers, and commands for each group. I also fixed a missingsave()call in the existingupdateGroupmethod.activityTracker.js: IntegratedgroupStoreinto the activity tracking flow. It now correctly identifies stickers (separate from generic images) and updates both user and group statistics.simpleStore.js: Improved theupdateStatsimplementation to fix a race condition where the user might not be found immediately after being created, and ensuredcreateUseris 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