Adopt LukasHaas codebase (newer whatsmeow, LID support, unified tools) + bugfixes - #343
Open
vkpeter wants to merge 6 commits into
Open
Adopt LukasHaas codebase (newer whatsmeow, LID support, unified tools) + bugfixes#343vkpeter wants to merge 6 commits into
vkpeter wants to merge 6 commits into
Conversation
Replaces the lharries codebase with the current LukasHaas/whatsapp-mcp state (newer whatsmeow, LID resolution, unified send_message/get_chat tools, /api/sync endpoint, robust reconnection) as a single tree snapshot, because the two repositories have unrelated git histories. This is the base for the follow-up fixes (timestamp parsing, media 403, general sync) that are stacked on top.
extractDirectPathFromURL() stripped the query parameters (oe expiry, oh origin hash, mms3) before handing the path to whatsmeow, which then rebuilt the media URL without them. mmg.whatsapp.net answered 403 for every download, including fresh media. Keep the full path+query so the download works; whatsmeow appends its own hash/mms-type params after.
…lder history requestHistorySync anchored on the oldest stored message and asked for history *before* it, so POST /api/sync never recovered messages that arrived while the bridge was offline. It now requests recent messages for every known chat by anchoring on 'now' (same synthetic-anchor pattern as requestChatSync for chats without stored messages).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR brings the whatsapp-mcp codebase up to date in two layers:
1. Sync with LukasHaas/whatsapp-mcp (single tree-snapshot commit)
The two repositories have unrelated git histories, so the LukasHaas state is applied as one tree snapshot on top of main rather than as a merge. Highlights of what that brings:
2. Bugfixes on top (5 commits)
All commits use a neutral author. No personal data included.