-
Notifications
You must be signed in to change notification settings - Fork 192
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 Whatsapp recipe unread counts for muted conversations #408
Fix Whatsapp recipe unread counts for muted conversations #408
Conversation
Did you test it? I didn’t but I’m not sure it would work. If a chat is unmuted, then Note: I’m not sure all unmuted chats’ |
Thanks for the insight @victorbnl. The patch is tested working on Version: 6.5.0-nightly.2 (rpm release deployed to Fedora Linux 38). Tests were simple however, observing the unread count change as expected when conversations were muted and unmuted, and correctly aggregating unread counts in other unmuted conversations. If Whatsapp Web behavior is intermittent (where only some chats yield a value of undefined), then perhaps the following update to the conditional would be an improvement:
I tested the above change and observed correct expected behavior with the same described rudimentary test. I did not see a value of I should add that the OP of the issue also validated the patch to be working for them in the issue comments. |
Well, I just checked again on WhatsApp and it seems that all my chats do have Though if we were to assume I am correct, that fix looks good to me. Edit: If everyone reports the presence of a Edit 2: It seems like it’s |
Let me know if you prefer the updated conditional which covers the case that an errant undefined value appears for |
For me you can let it as it is. Testing seems to show the attributes are present. Let’s wait for feedback from the developers. |
Hi guys! This is looking good :D Just tested and it works fine. I'm approving and merging this PR. Thank you @gmurdocca for your contribution |
@all-contributors - please add @gmurdocca for code |
I've put up a pull request to add @gmurdocca! 🎉 |
…ions.
Pre-flight Checklist
Please ensure you've completed all of the following.
Description of Change
This is a bugfix for issue #1303. Unread counts/badges were erroneously incrementing for Whatsapp conversations that were marked as muted. When mute option "Always" is chosen in Whatsapp Web, the value of
chat.muteExpiration
in webview.js is set to-1
, however the conditional that governs incrementing of unread counts expected a positive non-zero value in this variable to indicate a muted conversation. Chaging the comparison from> 0
to!= 0
solved the issue.