Skip to content

fix: Improve message retrieval with fallback after sending - #201867

Open
fallenleavesguy wants to merge 1 commit into
wwebjs:mainfrom
swordlib:fix/return-msg-model-after-sent
Open

fix: Improve message retrieval with fallback after sending#201867
fallenleavesguy wants to merge 1 commit into
wwebjs:mainfrom
swordlib:fix/return-msg-model-after-sent

Conversation

@fallenleavesguy

@fallenleavesguy fallenleavesguy commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

This pull request updates the logic for retrieving a sent message in the exports.LoadUtils function. The main change adds a fallback mechanism to ensure the message is found even if it's not immediately available in the main collection.

Message retrieval improvement:

  • Enhanced the message lookup logic in Utils.js so that if the message is not found using Msg.get, it will search through chat.msgs.getModelsArray() to find the message by ID. This increases reliability when accessing newly sent messages.## Description

Related Issue(s)

Testing Summary

Test Details

Environment

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

Type of Change

  • Dependency change (package changes such as removals, upgrades, or additions)
  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-code change (documentation, README, etc.)

Checklist

  • My code follows the style guidelines of this project.
  • All new and existing tests pass (npm test).
  • Typings (e.g. index.d.ts) have been updated if necessary.
  • Usage examples (e.g. example.js) / documentation have been updated if applicable.

@github-actions github-actions Bot added api changes API modifications utility Utility code labels Jul 29, 2026
@fallenleavesguy fallenleavesguy changed the title Improve message retrieval with fallback after sending fix: Improve message retrieval with fallback after sending Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api changes API modifications utility Utility code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant