Commit Graph

2208 Commits

Author SHA1 Message Date
Rajeh Taher 39541cc162 messages: No longer send <ack>s on successful decrypt + fix lid acks 2025-10-02 23:30:28 +03:00
Rajeh Taher 2d656424d6 WABinary: supported @hosted & @hosted.lid ids 2025-10-02 21:41:54 +03:00
Rajeh Taher b8f695cc82 general: linting 2025-10-02 21:41:12 +03:00
Rajeh Taher 929693e2a1 messages-send: clean up group message send logic 2025-10-02 21:40:00 +03:00
Rajeh Taher 0af6c2f298 general: preliminary support for @hosted + Usync LID stuff 2025-10-02 19:38:47 +03:00
Charlotte 9f6e1d954f fix: set duplex property when uploading media to server (#1837)
* fix: set duplex to half in getWAUploadToServer

* fix: add duplex to RequestInit interface
2025-10-01 07:55:50 +03:00
Rajeh Taher 096994b927 validate: Fix account signature check and device signature generation 2025-09-28 19:20:14 +03:00
Rajeh Taher 357ef1e599 defaults, validate: fix account signature check for non-hosted JIDs 2025-09-28 18:59:57 +03:00
João Lucas de Oliveira Lopes fb12f6d9d3 refactor: replace axios with fetch API and update related types (#1666) 2025-09-28 05:52:43 +03:00
Lucas Fochesatto cfe7a2b2b3 Feat: Fetch all groups from a community given a JID (#1763)
* feat: fetch all groups from a community given a jid

* fix lint

* fix == lint problem
2025-09-28 05:50:35 +03:00
Gustavo Quadri 6f1faf81da Fix: groups pn messages-send (#1829)
* fix: centralize wireJid at encryption layer

* fix: wirejid mess

* fix: use signalrepository validate session in assertsessions

* fix: wirejid conversion before fetch session

* fix: lint
2025-09-28 05:45:47 +03:00
Rajeh Taher 1eef97aa86 defaults, validate-connection: fix structure of ADV types 2025-09-28 03:58:17 +03:00
Matheus Filype 7d5c28cf72 fix: No session found to decrypt message and recover lost messages due to this reason (#1822)
* fix: improve message resend logic by adding checks for message IDs

* Revert "fix: improve message resend logic by adding checks for message IDs"

This reverts commit c03f9d8e6fc6cbfbb9d1f8f67c169700e704213d.

* fix: handle device identity inclusion for retry resends in message sending

* feat: lint fix

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2025-09-26 15:48:04 +03:00
Matheus Filype 7b0e39f443 feat: add expiration key in group message (#1790)
* fix: improve message resend logic by adding checks for message IDs

* Revert "fix: improve message resend logic by adding checks for message IDs"

This reverts commit c03f9d8e6fc6cbfbb9d1f8f67c169700e704213d.

* feat: add support for ephemeral message expiration in group messages

* fix: lint errors
2025-09-26 15:45:00 +03:00
Rajeh Taher b9f128472e decode-wa-message: linting 2025-09-26 15:41:42 +03:00
Martijn Poppen 6ba7a8cdcf FIX: fromMe (#1796) 2025-09-26 15:41:06 +03:00
github-actions[bot] 573ed2c427 chore(release): v7.0.0-rc.4 2025-09-26 08:55:34 +00:00
Rajeh Taher d9fed62d00 message: Add addressing mode 2025-09-26 11:13:22 +03:00
Rajeh Taher 4344e5184a socket: return on empty userlist in onWhatsApp 2025-09-26 10:21:00 +03:00
Rajeh Taher 8b1cfe913d messages-send: fix text subtype when not needed 2025-09-26 10:17:56 +03:00
Rajeh Taher 6c6c078625 messages-send: missing extra attrs on skmsg enc 2025-09-26 09:32:39 +03:00
Rajeh Taher fb6907f9ee socket: changes to onWhatsApp 2025-09-26 09:26:59 +03:00
Rajeh Taher 86d45758bb messages: add missing property in sticker messages 2025-09-26 09:20:16 +03:00
Gustavo Quadri ae456cb342 fix: send message speed, lid logic, remove messages-send useless functions (#1794)
* fix: remove redundant migration

* fix: remove deduplicatelidpnjids

* fix: assertsessions complexity

* fix: assertsessions call

* fix: remove getencryptionjid

* fix: add wirejid to injecte2esession, remove libsignal lid migration

* fix: logger lid-mapping

* fix: injecte2esession decoded approach

* fix: changes made by @AstroX11

* fix: lint

* fix: lint

* fix: lint

* Revert "fix: injecte2esession decoded approach"

This reverts commit 4e368296ed084398b8a173ec117dc2478e481748.

* fix: centralize getlidforpn calls in messages-send

* fix: add resolvechunklids to signal

* fix: remove useless arrays

* fix: assertsessions logic

* fix: lint

* Revert "fix: assertsessions logic"

This reverts commit 65b0730891c91573edcab1c96af010db54382fba.

* fix: remove onwhatsapp fallback to prevent rate limit, migrate sessions when lid-map is created, new migration logic and user devices key

* fix: migrate session devices, socket creation

* fix: add back decryptionjid validation

* fix: add resolveSignalAddress to get lid

* fix: type error migration

* fix: lint

* fix: device level cache, proposed changes
2025-09-26 06:53:15 +03:00
Rajeh Taher e965385841 utils: update exports 2025-09-26 05:52:53 +03:00
Henrique Dias ae0efa54d5 fix makeCacheableSignalKeyStore await cache get (#1817)
Co-authored-by: Henrique Dias <dias.dsn.cir@alterdata.com.br>
2025-09-26 04:46:30 +03:00
João Lucas de Oliveira Lopes 3b46d43beb fix: harden Protobuf Deserialization and Refactor Utilities (#1820)
* refactor: reorganize browser utility functions and improve buffer handling

* fix: harden protobuf deserialization and clean up code

* refactor: simplify data handling in GroupCipher and SenderKey classes

* fix: Ensure consistent Buffer hydration and remove redundant code

* refactor: update decodeAndHydrate calls to use proto types for improved type safety
2025-09-26 04:45:30 +03:00
Rajeh Taher 202c39f3fe message-send: missing media type 2025-09-26 03:23:46 +03:00
Rajeh Taher d0acd42992 lid-mapping: remove redundant logic 2025-09-25 23:53:05 +03:00
Rajeh Taher 39d2ac004a messages-recv: remove old message retry system, new one handles fine 2025-09-25 23:47:29 +03:00
github-actions[bot] f6e1bb6150 chore(release): v7.0.0-rc.3 2025-09-14 19:57:18 +00:00
Gustavo Quadri 194b557b0f fix: optimize LID migration performance and introduce cache (#1782)
* chore: lid-map cache, bulk migration, fixes

* fix: type error

* fix: signalrepository with lid type, remove check from assertsessions, lid-mapping store level deduplication

* fix: migrations logs

* fix: remove migrationsops lenght check

* fix: skip deletesession if cached or existing migrations

* chore: remove check migrated session

* fix: remove return null loadsession

* fix: getLIDforPN call and jidsrequiringfetch

* fix: longer lid map cache TTL

* fix: lint

* fix: lid type

* fix: lid socket type
2025-09-14 21:58:59 +03:00
Rajeh Taher 42c980778e send, usync: fix lid Usync (including onWhatsApp), and send phash 2025-09-14 21:35:13 +03:00
Martín Schere 8029446511 Async + Multi Cache (#1741)
* fix: handle invalid signatureKeyPublic types in sender-key-state

- added extra check to ensure signatureKeyPublic is either a base64 string or a Buffer
- fallback to empty buffer when unexpected object type is received
- prevents ERR_INVALID_ARG_TYPE error in Buffer.from

* adjusted based on  @jlucaso1 recommmendation

* fix: handle chain key objects for skmsg group message decryption

previously, some sender chain keys were stored or retrieved as plain objects
(e.g. { '0': 85, '1': 100, ... }) instead of Buffers. this caused
"ERR_INVALID_ARG_TYPE" during initial decryption of skmsg group messages.

this fixes any chain key object is converted to a proper Buffer
before being passed to SenderChainKey.

* fix: add more robust checks and fallbacks

* feat: async cache

feat: async caching

* fix: linting issues

* fix: mget logic

---------

Co-authored-by: αѕтяσχ11 <devastro0010@gmail.com>
2025-09-14 17:13:11 +03:00
suhwr f0cc173aa3 Correct group participant phoneNumber attribute name (#1775) 2025-09-14 17:06:17 +03:00
M Ilham Ari Fahmi c8ebdb9a0b fix: fallback addressing_mode detection by sender suffix (#1776)
* fix: fallback addressing_mode detection by sender suffix

This commit is required because `remoteJidAlt` was not appearing.
The issue happened since `addressing_mode` always defaulted to 'pn' when the ID was not a group, so the 'lid' path was never taken.

* lint fix
2025-09-14 17:05:48 +03:00
João Lucas de Oliveira Lopes 421ca2eb92 refactor(types): Strengthen Type Safety in Signal Handling & Core Utilities (#1764)
* refactor(types): Strengthen Type Safety in Signal Handling & Core Utilities

* chore: revert typescript and move types to libsignal

* chore: update libsignal dependency resolution and checksum

* fix: a minor regression

* chore: update libsignal resolution and checksum
2025-09-13 15:24:57 +03:00
Rajeh Taher e305d4848e sender-key: credit original fix and fix key handling 2025-09-13 11:41:52 +03:00
αѕтяσχ11 f0dcc30e0f fix: handle invalid signatureKeyPublic types in sender-key-state AND fix handling chain key objects for skmsg group message decryption (#1760)
* fix: handle invalid signatureKeyPublic types in sender-key-state

- added extra check to ensure signatureKeyPublic is either a base64 string or a Buffer
- fallback to empty buffer when unexpected object type is received
- prevents ERR_INVALID_ARG_TYPE error in Buffer.from

* fix: lint

* adjusted based on  @jlucaso1 recommmendation

* fix: handle chain key objects for skmsg group message decryption

previously, some sender chain keys were stored or retrieved as plain objects
(e.g. { '0': 85, '1': 100, ... }) instead of Buffers. this caused
"ERR_INVALID_ARG_TYPE" during initial decryption of skmsg group messages.

this fixes any chain key object is converted to a proper Buffer
before being passed to SenderChainKey.

* fix: add more robust checks and fallbacks

* hacky fix(sender-key-state): normalize signing pubkey as Buffer with 0x05 prefix

a little hacky fix that ensures getSigningKeyPublic always returns a proper Buffer to satisfy libsignal.
adds a fallback to prepend 0x05 when only a 32-byte key is present, avoiding
"Invalid public key" errors and TS type issues around Uint8Array vs Buffer.
2025-09-13 11:04:26 +03:00
Rajeh Taher 88ec0c4db2 Merge remote-tracking branch 'origin/master' 2025-09-09 23:57:39 +03:00
Rajeh Taher 9aa356845d sender-key: Properly digest new uint8array format keys. THANKS @w3nder!! 2025-09-09 23:57:30 +03:00
github-actions[bot] 7970a6e9af chore(release): v7.0.0-rc.2 2025-09-08 22:04:09 +00:00
Rajeh Taher 2ebaaf35a4 handlemessage: change console based log 2025-09-09 00:59:08 +03:00
Rajeh Taher 8a9fba7a8a Merge remote-tracking branch 'origin/master' 2025-09-09 00:55:03 +03:00
Rajeh Taher 8204e57a40 socket: fix onWhatsApp 2025-09-09 00:54:59 +03:00
Rajeh Taher f770c4ebb7 Update breaking change notice to version 7.0.0 2025-09-09 00:46:10 +03:00
Rajeh Taher b558d67851 Revise breaking change notice in README 2025-09-09 00:45:54 +03:00
github-actions[bot] f0a40e2856 chore(release): v7.0.0-rc.1 2025-09-08 21:02:04 +00:00
Rajeh Taher 4a1a06bed5 socket: fix onWhatsApp for LIDs and map any new LID pairs 2025-09-08 23:58:25 +03:00
Rajeh Taher acd7b757ce messages-recv,decode-wa-message: stability 2025-09-08 23:27:07 +03:00