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
Add support for sticker Name and author #527
Conversation
This patch of Client.js includes support for sticker metadata
Added Sticker author and sticker name support
fixes a bug
this also requires the installation of an npm package called "webp-convert" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First, all my comments are just suggestions, I'm not the one who will merge this.
I suggest you to fix linting issues, this will make you PR gets more attention.
Another thing is that I don't think this code should be added in Client.js
file, maybe processStickerData
function at Injected.js
would be a better place to handle this
If I can help you in some way just let me know, I'm looking forward to use this feature.
Thanks, that would be appreciated as I don't have much experience in puppeteer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Credits go to @mpirescarvalho for refactoring the code |
add await when needed and polish work with files
just finished another batch of commits, yeah ik i should have tested locally because all of this is just linting. |
This is the last commit i am gonna publish to this pr, unless anything goes wrong.. |
@pedroslopez |
Just added sticker Categories, it is an array of emojies that put your stickers in the categories menu of stickers. For more info: https://github.com/WhatsApp/stickers/wiki/Tag-your-stickers-with-Emojis |
Thank you! |
# By Pedro S. Lopez (3) and others # Via GitHub * 'master' of github.com:harish2704/whatsapp-web.js: Update lint.yml feat: acceptGroupV4Invite (pedroslopez#677) chore: update eslint and ecmaVersion (pedroslopez#680) chore: update lint action (pedroslopez#679) feat(dev): add argument bypassCSP to use in pupperter (pedroslopez#635) add searchMessages method (pedroslopez#586) feat: Add from which device the message was sent (pedroslopez#648) feat: disable / enable WA Web features (pedroslopez#543) feat: Get Orders and Products (pedroslopez#612) add extra option to MessageSendOptions (pedroslopez#600) feat: openChatWindow can open new chats (pedroslopez#592) Add sendVideoAsGif option (pedroslopez#578) Add support for sticker Name and author (pedroslopez#527) # Conflicts: # package.json
This reverts commit efc7018.
* Added Sticker author and sticker name support This patch of Client.js includes support for sticker metadata * Docs: stickerName and stickerAuthor in MessageOpts * Hotfix_Sticker_Feature fixes a bug * Update global.html * updated * fixed comma * Fixed duplicate code * Fixing eslint * Fixing eslint again * eslint.... * fixing problem with eslint. * move sticker exif data filling to Utils.formatToWebpSticker() function * Update Client.js * Added temporary stuff * eslint * Update Util.js * eslint bad :D * eslint * polish work with files * fix error and TODOs * clean up code to match with repo code style * update typescript params * Update src/util/Util.js camel Case Co-authored-by: Pedro S. Lopez <pedroslopez@me.com> * Update Util.js * ➖ webp-converter ➕ node-webpmux * Update Util.js * ✨ Use node-webpmux * ➖ node-webpmux ➕ node-webpmux-commonjs * ✏️ Fixed require mode * ➕node-webpmux ➖ node-webpmux-commonjs * ⬆️ Node-webpmux update changes * 🚨 removing try/catch * 🚨 complier warnings * 🧐 stupid mistakes * ⬆️ Upgrade required version * 🐛 creating a buffer the right way * 🐛 linting and simplification * 🐛 unsimplification * 🚨 eslint loves singlequotes * ✨ Added emojis / categories in metadata * 🏷️ TypeScript Declarations * ✨ Sticker Categories in sendMessage * 🏷️ Improved TS declarations * fix stickerCategories type * fix: don't set name/author if not defined Co-authored-by: Marcelo Carvalho <mpirescarvalho17@gmail.com> Co-authored-by: Pedro S. Lopez <pslamoros@hotmail.com> Co-authored-by: Pedro S. Lopez <pedroslopez@me.com>
This adds sticker name and author support by modifying EXIF metadata of the webp sticker file. I extracted the exif data from a legit sticker, so this should function properly...
Example image