-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fix client-side message rendering issue when sending attachements through the library #1905
Conversation
I still have this issue after adding the line in Injected.js After restarting the client, the message still has the type "chat" and the body is a base64 thumbnail. I am in headless mode google chrome, If I take a screenshot with Are there other changes to the source code other that the one line in the Injected.js? Thanks a lot! |
Works for me :) |
@PurpShell FYI: I had to revert this in #1932 because it broke sending stickers. |
@pedroslopez can you please investigate for a way to re-add this without making breaking changes? |
…achements through the library (pedroslopez#1905)" (pedroslopez#1932) This reverts commit 7dd8688.
…s through the library (pedroslopez#1905)
…s through the library (pedroslopez#1905)
…s through the library (pedroslopez#1905)
…s through the library (pedroslopez#1905)
…s through the library (pedroslopez#1905)
@PurpShell Can you fix it without breaking stickers and create a new PR. This is an important fix for me |
. |
* fix: compatibility with LegacyPhoneFeatures in latest WhatsApp Web version (#1930) * fix removed features on latest wweb version * errors * fix: Fix client-side message rendering issue when sending attachements through the library (#1905) * Update supported WhatsApp Web version to v2.2301.6 (#1869) Co-authored-by: pedroslopez <pedroslopez@users.noreply.github.com> * fix method downloadMedia when not found msg (#1852) Co-authored-by: Rajeh Taher <rajeh@reforward.dev> * Adding missing CALL in events enum (#1899) * chore: mark version v1.19.0 * Revert "fix: Fix client-side message rendering issue when sending attachements through the library (#1905)" (#1932) This reverts commit 7dd8688. * chore: mark version v1.19.1 * update docs for 1.19.1 * fix group methods (#1934) * fix: create group * fix set group subject, description, properties; exit group * fix participant methods * fix return type * fix invite methods * chore: mark version v1.19.2 * Fix: message.getInfo (#1953) window.Store.MessageInfo.sendQueryMsgInfo now needs msg.id instead of msg * 1.20.0-alpha.0 * chore: mark version v1.19.3 * try to fix queryWidExists (#1987) * fix getNumberId * Fixing the queryWidExists function (#1989) * Update Injected.js fix function queryWidExists * Update Injected.js support WA old version 2.2305.7 --------- Co-authored-by: Pedro S. Lopez <pedroslopez@me.com> * merge fix * Fix mute chat (#1982) * fix function set mute chat * chat mute new object * Update supported WhatsApp Web version to v2.2306.7 (#1954) Co-authored-by: pedroslopez <pedroslopez@users.noreply.github.com> * chore: mark version v1.19.4 --------- Co-authored-by: Pedro S. Lopez <pedroslopez@me.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: pedroslopez <pedroslopez@users.noreply.github.com> Co-authored-by: tofers <acerkot@mail.ru> Co-authored-by: Azeem Haider <axeemhaider@gmail.com> Co-authored-by: Michal Serlui <70711723+shirser121@users.noreply.github.com> Co-authored-by: WWebJS Bot <hello@wwebjs.dev>
…s through the library (pedroslopez#1905)
…achements through the library (pedroslopez#1905)" (pedroslopez#1932) This reverts commit 7dd8688.
…s through the library (pedroslopez#1905)
…achements through the library (pedroslopez#1905)" (pedroslopez#1932) This reverts commit 7dd8688.
PR Details
This PR aims to fix the issues with rendering an attachement sent through WWebJS in the GUI after the reload/restart of the client.
Description
It seems the issue was that the mediaData prop was not getting properly serialized and added to the message object, which has been reflected & changed in MD. Now in MD, (in the code) the prop is also serialized and appended to the msg object in WhatsApp Web code. I have tested all types of attachments and this seems to work properly
Motivation and Context
This fix will make the UI more enjoyable and appropriate. The issue was in how the message type
"chat"
was not affected after the concatenation of the attachment options, and so on reload the body (the thumbnail) was eventually just rendered as text rather than an image. This change was needed to make the library a better experience overall to people who use the GUI in co-ordinance with the library. This also fixes other issues like the instability of message type after sending a message with attachments.How Has This Been Tested
Fully tested on a session with normal WhatsApp on Android. Please try this pull request and help us assure it is fully functioning, it should be though as it now mimics 1:1 how it is sent in WA.
Types of changes
Checklist