Skip to content

Conversation

@vladyslav-shmyrko
Copy link

PR Details

Adding search option since for getChats and fetchMessages.

Description

This PR introduces an optional since parameter to getChats and fetchMessages.
The parameter allows fetching only chats and messages updated after a given Unix timestamp (in seconds), improving efficiency and performance.

Related Issue(s)

Motivation and Context

When using the library, fetching all chats and messages at once leads to high memory consumption, especially with large histories.
By introducing the since parameter, we can significantly reduce memory usage and improve overall scalability by narrowing the result set to only recent or relevant data.

How Has This Been Tested

Environment

  • Machine OS:
  • Phone OS:
  • Library Version:
  • WhatsApp Web Version:
  • Puppeteer Version:
  • Browser Type and Version:
  • Node Version:

Types of changes

  • Dependency change
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • I have updated the documentation accordingly (index.d.ts).
  • I have updated the usage example accordingly (example.js)
@DenysSamoiliuk
Copy link

@alechkos @tuyuribr

Good afternoon, could you please take a look at this pull request and give your verdict, the changes are not significant, but they help a lot when working with dialogue editing

@purpshell
Copy link
Collaborator

This is a good PR with a good intent, but I feel like what makes more sense for the project is a way to run a selector for each chat in the web rather than apply these ambiguous and incomplete filters.

@BenyFilho BenyFilho added the waiting for testers Waiting for other people test this PR in other envs label Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting for testers Waiting for other people test this PR in other envs

4 participants