Skip to content
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 pfp change notification #323

Merged
merged 13 commits into from
Apr 28, 2024
Merged

Fix pfp change notification #323

merged 13 commits into from
Apr 28, 2024

Conversation

codebossdev
Copy link
Contributor

Beforehand, it would try to set the picture as the baileys' user because of the "from" attribute, but this has been corrected to either use the jid attribute or the hash for non-contacts (not saved)

Some md5 hash comparison occurs and we can find the contact to update

also, prior to this update, the field would've just stayed at "changed" and cached that too, which would've caused a bunch of crashes I guess at "store.fetchImageUrl"
Because of this though, a socket is recommended to be passed into the config

@whiskeysockets-bot
Copy link
Contributor

Thanks for your contribution.

The next step is to wait for review and approval to merge it to main repository

The community can help reacting with a thumb up (:thumbsup:) for approval and rocket (:rocket:) for who has tested it.

To test this PR you can run the following command below:

# NPM
npm install @whiskeysockets/baileys@WhiskeySockets/Baileys#fix-contact-notifs
# YARN v2
yarn add @whiskeysockets/baileys@WhiskeySockets/Baileys#fix-contact-notifs

@Alhar6i

This comment was marked as off-topic.

@Alhar6i
Copy link
Contributor

Alhar6i commented Aug 20, 2023

The update has an issue in the case of fetching the group profile picture.
I'm not sure where is the problem but I get the error mentioned in my previous comment after applying the PR in my code.

@PurpShell
Copy link
Collaborator

The update has an issue in the case of fetching the group profile picture. I'm not sure where is the problem but I get the error mentioned in my previous comment after applying the PR in my code.

This is not related to that at all. This only updates the contact in a memory store to accurately reflect profile picture info. Groups or not is not the problem

@PurpShell PurpShell marked this pull request as draft January 19, 2024 18:11
@PurpShell PurpShell marked this pull request as ready for review April 28, 2024 10:44
@PurpShell PurpShell merged commit 3b87d74 into master Apr 28, 2024
2 checks passed
Git-RenatoAlcantara pushed a commit to Git-RenatoAlcantara/amarulawebsocket that referenced this pull request Nov 2, 2024
* Crash if chat is already deleted

* Crash if chat is already deleted (WhiskeySockets#321) (WhiskeySockets#322)

* Update messages-recv.ts

* Update make-in-memory-store.ts

* Update messages-recv.ts

* Update make-in-memory-store.ts

* Fix store errors

* Fix hash issue

* Fix eslint

* Update messages-recv.ts

* Update messages-recv.ts

* ESLint final

* no more eslint errors!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants