Commit Graph

80 Commits

Author SHA1 Message Date
DevAstro
3cdb0f4dd9 Bump Jimp && Sharp (#1575)
* Bump Jimp && Sharp

Upgrade and use the latest version of jimp and sharp libraries

* lint
2025-07-05 23:58:57 +03:00
João Lucas de Oliveira Lopes
92b4c68de0 fix: Handle data: URIs in getStream to prevent server crash (#1524) 2025-07-04 19:25:19 -03:00
João Lucas de Oliveira Lopes
8391c02e0b [READY FOR MERGE] Implement newsletter (#1532)
* feat: implement basic newsletter functionality with socket integration and event handling

* feat: enhance media handling for newsletters with raw media upload support

* feat: working updatePicture, removePicure, adminCount, mute, Unmute

* fix: fetchMessages

* chore: cleanup

* fix: update newsletter metadata path and query ID for consistency. newsletterMetadata works now

* chore: enhance newsletter metadata parsing and error handling

* fix: correct DELETE QueryId value in Newsletter.ts

* chore: split mex stuffs to own file

* chore: remove as any
2025-06-30 23:22:09 -03:00
DevAstro
a4b96ed37e [READY FOR MERGE] Add support for custom profile picture dimensions (#1563)
* Add support for custom profile picture dimensions

The updateProfilePicture and generateProfilePicture functions now accept an optional dimensions parameter, allowing custom width and height for profile pictures. This provides more flexibility for image resizing beyond the default 640x640 size.

* minor corrections

Replaces 'w' and 'h' with 'width' and 'height' in profile picture related functions for improved clarity and consistency.

* fix lint
2025-06-30 16:04:37 -03:00
João Lucas de Oliveira Lopes
591c98f3e6 fix: validate media URL before downloading content from message (#1560) 2025-06-30 16:02:40 -03:00
Borewit
f404147736 Use parseFile for audio file paths instead of converting to stream (#1529)
When extracting duration from an audio file provided as a file path,
use music-metadata's parseFile method instead of manually creating a
read stream and using parseStream.

parseFile utilizes random access, which can significantly improve
performance over streaming in many cases. However, actual speed gains
depend on the file format and the structure of tag headers.

Co-authored-by: Borewit <Borewit@users.noreply.github.com>
2025-06-20 13:11:29 +03:00
canove
ae0de94307 chore: fix format 2025-05-28 22:44:21 -03:00
canove
eb6c6c8ba9 Merge branch 'master' of https://github.com/WhiskeySockets/Baileys into fix-eslint-prettier-editorconfig-rules 2025-05-28 22:42:28 -03:00
canove
fb83e4799d chore: remove unused variables 2025-05-13 18:35:29 -03:00
canove
fa706d0b50 chore: format everything 2025-05-06 12:10:19 -03:00
canove
f58a38fde9 fix: allow media upload retries 2025-05-06 08:06:05 -03:00
canove
53c77dd11c chore: lint 2025-05-05 21:20:25 -03:00
canove
bff86ed4c1 fix: memory blow on large files sending through URL 2025-05-05 21:11:40 -03:00
w3nder
dfe8bb3283 refactor(messageId): update all remaining usages to v2 format consistently 2025-04-30 00:59:19 -03:00
João Lucas de Oliveira Lopes
8083754621 refactor: turn hkdf functions to async and remove extra deps (#1272)
* refactor: remove futoin-hkdf dependency and update hkdf implementation

* refactor: use crypto subtle and update functions to async

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2025-03-01 18:31:48 +02:00
contato.mateusfr@gmail.com
21f8431e61 Dependency Inversion for Logger (#1153)
* feat: interface "ILogger" created
feat: interface "ILogger" used instead of pino logger
feat: "PinoLoggerAdapter" created to implement "ILogger" interface

* feat: PinoLoggerAdapter removed
feat: ILogger mapping the features we're using from pino

* fix: sort imports

---------

Co-authored-by: Mateus Franchini de Freitas <contato.mateusfr@outlook.com>
Co-authored-by: Mateus Franchini de Freitas <mfranchini@domtec.com.br>
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2025-03-01 18:30:51 +02:00
Rajeh Taher
aeabecdf67 messages-media: fix waveform import 2025-02-16 18:36:59 +02:00
Rajeh Taher
18ac07df8e lint: 0 warnings left 2024-10-14 05:15:10 +03:00
Ericky Thierry
abafce525c stream to buffer conversion for no apparent need 2024-07-12 20:54:22 -03:00
Rajeh Taher
c8aab8d03f fix(master): yarn lock and axios error + move to WhiskeySockets libsignal 2024-06-16 17:11:17 +03:00
Timothy Dillan
5b02715fb0 chore: fix audio decode error due to passing spread argument 2024-01-21 13:28:10 +08:00
Davidson Gomes
cba9827851 feat: Send Status (status@broadcast) {text, media, audio(with waveform)} (#249)
Co-authored-by: Davidson Gomes <contato@agenciadgcode.com>
2023-07-18 10:25:16 -03:00
Codeboss
2c76713565 feat: Add waveforms to voice messages (#180)
Co-authored-by: Edgard <edgardmessias@gmail.com>
2023-07-13 21:08:11 -03:00
Adhiraj Singh
bd17f3742e fix: stream destroy 2023-03-03 12:41:37 +05:30
Adhiraj Singh
7e9b9b7f9a fix: stream errors not being handled 2023-03-03 12:28:16 +05:30
Adhiraj Singh
cc1fc9a53c fix: delete tmp file if failed enc 2023-02-20 21:18:31 +05:30
Adhiraj Singh
4ba828320e feat: handle maxContentLength in downloading media 2023-02-18 13:03:58 +05:30
Adhiraj Singh
ca24608dc8 chore: pass axios options to downloading remote media 2023-02-18 13:03:47 +05:30
Adhiraj Singh
f013b61e35 chore: update axios 2023-02-18 12:34:04 +05:30
kaatt
cd9441fd0e Update messages-media.ts 2022-11-14 16:26:23 +05:30
kaatt
5c950dac10 fix getImageProcessingLibrary usage 2022-11-14 16:26:23 +05:30
kaatt
c59952f2ee fix extractImageThumb threw with webpack (#2266)
* fix extractImageThumb threw with webpack

* Update messages-media.ts

* Update src/Utils/messages-media.ts

* fix: typescript errors

Co-authored-by: Adhiraj Singh <adhirajsingh1001@gmail.com>
2022-10-18 09:31:32 +05:30
Adhiraj Singh
116b30dff0 feat: expose axios options 2022-09-19 17:25:54 +05:30
Adhiraj Singh
e7f6838fa4 chore: remove legacy code 2022-09-19 14:59:35 +05:30
Adhiraj Singh
733345bb95 fix: jimp thumb gen 2022-09-15 18:47:00 +05:30
Adhiraj Singh
f0bdb12e56 feat: generate high quality thumbs on link preview 2022-09-15 18:40:22 +05:30
Adhiraj Singh
864a01f9a5 feat: return og dimensions when generating thumb 2022-09-15 16:00:23 +05:30
Adhiraj Singh
3a891e071e feat: map all WA media types 2022-09-15 15:09:51 +05:30
Adhiraj Singh
b05ce25dfa fix: do not add default check for sharp 2022-09-15 10:01:24 +05:30
kaatt
0f989751db actually fix 2022-09-15 10:01:24 +05:30
kaatt
48f8b30583 fix getImageProcessingLibrary 2022-09-15 10:01:24 +05:30
Adhiraj Singh
35b7a310a4 fix: correctly check for image processing lib 2022-09-12 12:24:55 +05:30
Adhiraj Singh
765dcc1d1f fix: upload for product 2022-09-02 20:10:13 +05:30
Adhiraj Singh
c5917364ba chore: add stronger lint rules 2022-08-18 10:37:40 +05:30
Adhiraj Singh
2549d10be9 feat: update proto
The new proto extract has a bunch of breaking changes, so if you were using the raw proto in your code somewhere -- then you may have to update your code to make it work with the new proto

!BREAKING_CHANGE
2022-08-01 10:43:04 +05:30
Adhiraj Singh
40a1e268aa feat: add "strictNullChecks" 2022-07-09 10:20:07 +05:30
Adhiraj Singh
de95694266 fix: use correct status code for throwing media error 2022-07-04 11:24:34 +05:30
Adhiraj Singh
06ce5f9be0 feat: add media retry for MD 2022-06-01 13:04:45 +05:30
Adhiraj Singh
a98484c38b refactor: split "downloadContentFromMessage" to "downloadEncryptedContent"" 2022-04-21 00:52:17 +05:30
Adhiraj Singh
872536fa5b feat: link previews on MD 2022-04-19 19:00:32 +05:30