Commit Graph

50 Commits

Author SHA1 Message Date
github-actions[bot] 40d3678659 chore: update proto/version to v2.3000.1034172552 (#233)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-27 00:45:05 -03:00
github-actions[bot] fa417f2a6d chore: update proto/version to v2.3000.1034095029 (#226)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-26 00:46:17 -03:00
github-actions[bot] 75efe2bfbc chore: update proto/version to v2.3000.1034008163 (#218)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-25 00:47:42 -03:00
github-actions[bot] b153b1b649 chore: update proto/version to v2.3000.1033927531 (#214)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-24 00:47:46 -03:00
github-actions[bot] 4474304b84 chore: update proto/version to v2.3000.1033866714 (#209)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-23 00:49:36 -03:00
github-actions[bot] aec431bd30 chore: update proto/version to v2.3000.1033849325 (#206)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-22 00:46:55 -03:00
github-actions[bot] 16a0d5b163 chore: update proto/version to v2.3000.1033815006 (#203)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-21 00:43:23 -03:00
github-actions[bot] cd8c7d5a16 chore: update proto/version to v2.3000.1033732349 (#198)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-20 00:46:26 -03:00
github-actions[bot] fe66257a0f chore: update proto/version to v2.3000.1033679241 (#195)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-19 00:48:20 -03:00
github-actions[bot] 05807993ee chore: update proto/version to v2.3000.1033647198 (#193)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-18 19:32:11 -03:00
github-actions[bot] b05cff1732 chore: updated proto/version to v2.3000.1033598431 (#191)
Co-authored-by: rsalcara <rsalcara@users.noreply.github.com>
2026-02-18 03:49:04 +00:00
github-actions[bot] ecc40b79fd Merge pull request #188
Merged PR #188 using squash merge.
2026-02-17 09:22:05 -03:00
rsalcara 5873b8cde6 chore: updated proto/version to v2.3000.1033509996 2026-02-16 01:45:30 +00:00
rsalcara 8efed984dc chore: updated proto/version to v2.3000.1033496302 2026-02-15 01:45:36 +00:00
Claude 4f919baefb fix: proto-extract auto-convert required to optional for proto3 compatibility
This commit implements a permanent fix for the proto extraction process to handle
WhatsApp's recent changes where they mark certain fields as "required" in their
JavaScript metadata.

Changes:
1. proto-extract/index.js:
   - Added automatic conversion of 'required' to 'optional' after proto generation
   - Proto3 spec doesn't support 'required' keyword (only proto2 does)
   - All fields in proto3 are implicitly optional by default

2. WAProto/WAProto.proto:
   - Updated to WhatsApp version 2.3000.1033472679 (latest)
   - All 27 'required' fields converted to 'optional'
   - Now compiles successfully with protoc

3. WAProto/index.d.ts & index.js:
   - Regenerated with correct proto3 syntax
   - index.d.ts now has 14,572 lines (was 2 lines when broken)
   - Full TypeScript definitions restored

Impact:
-  Build now succeeds (was failing with proto3 required error)
-  Tests: 582/583 passing (99.8%)
-  Lint: 0 errors, 239 warnings
-  Future proto updates will auto-fix 'required' fields

Technical details:
WhatsApp Web still uses proto3 but now marks certain fields as "required" in their
JS metadata. The extractor was copying these flags directly, causing invalid proto3
syntax. This fix ensures all 'required' keywords are converted to 'optional' after
extraction, maintaining proto3 compliance.

https://claude.ai/code/session_015R3U3kiprQiNTTNNt31Sg6
2026-02-14 04:43:42 +00:00
rsalcara 3f7c663d60 chore: updated proto/version to v2.3000.1033468106 2026-02-14 01:45:05 +00:00
Claude 4b43d8bf30 fix: revert to proto3 syntax and remove invalid required fields
- Changed WAProto.proto from proto2 back to proto3 (aligned with Baileys upstream)
- Removed 27 invalid 'required' fields (proto3 does not support required keyword)
- Replaced all 'required' with 'optional' to maintain proto3 compatibility
- Regenerated WAProto static files (index.d.ts, index.js) with correct proto3 syntax
- Preserved WhatsApp version 2.3000.1033381705 (daily updates)
- Preserved all custom messages (AIMediaCollectionMessage, AIMediaCollectionMetadata, etc)
- All TypeScript errors resolved, build passing

https://claude.ai/code/session_015R3U3kiprQiNTTNNt31Sg6
2026-02-13 21:30:27 +00:00
Claude 8bea170f3f fix: resolve all TypeScript errors in WAProto and test files
- Changed WAProto.proto syntax from proto3 to proto2 to support required fields
- Regenerated WAProto static files (index.d.ts, index.js) with correct proto2 syntax
- Fixed type annotations in test files (circuit-breaker, sync-action-utils, trace-context)
- Fixed Mock type errors in baileys-event-stream and cache-utils tests
- Fixed LID mapping test expectations to match array type
- All 78 TypeScript errors resolved, 0 remaining

https://claude.ai/code/session_015R3U3kiprQiNTTNNt31Sg6
2026-02-13 21:18:35 +00:00
rsalcara b380c5ded8 chore: updated proto/version to v2.3000.1033381705 2026-02-13 01:45:32 +00:00
Claude 879970fda8 fix(carousel): remove hasSubtitle proto field + add debug logging
- Remove hasSubtitle (field 10) from Header proto definition, index.js
  and index.d.ts - this field was adding extra bytes to encoded protobuf
  that working implementations don't send, potentially causing rejection
- Remove hasSubtitle from carousel card headers and root header
- Add [CAROUSEL DEBUG] logging in relayMessage to dump:
  - Encoded message bytes as base64 (for binary comparison)
  - Message structure as JSON
  - Per-device encoded bytes with DSM flag
- This enables byte-level comparison with working implementations

https://claude.ai/code/session_01EK9NpViRCtda1WAvFd8ptR
2026-02-06 21:27:40 +00:00
Claude 3ac2c33d93 fix(carousel): hasSubtitle + relayMessage direto + proto atualizado
Implementação completa baseada na análise ponto-a-ponto de 5 diferenças:

1. hasSubtitle adicionado ao proto schema (field 10, bool em Header)
   - Adicionado ao WAProto.proto, index.js (encode/decode/fromObject/toObject)
   - Adicionado ao index.d.ts (IHeader, Header class)
   - Usado no root header e em cada card do carousel

2. relayMessage direto para carousel em sendMessage
   - Detecta nativeCarousel no content e bypassa generateWAMessage inteiro
   - Chama generateWAMessageContent (que usa fromObject) diretamente
   - Depois relayMessage sem passar por generateWAMessageFromContent
   - Elimina: segundo WAProto.Message.create(), contextInfo.expiration, etc.

3. Pipeline final do carousel agora:
   sendMessage → generateWAMessageContent(fromObject) → relayMessage
   Sem: generateWAMessageFromContent, WAProto.Message.create, ephemeral

Commits anteriores já incluem:
- viewOnceMessage wrapper
- fromObject no generateWAMessageContent
- Skip tctoken no stanza

https://claude.ai/code/session_01EK9NpViRCtda1WAvFd8ptR
2026-02-06 21:07:44 +00:00
João Lucas de Oliveira Lopes 9611a1a982 fix(WAProto): Handle string values in long fields during JSON serialization (#1991)
* feat: add patch-tojson functionality for improved proto serialization

* Remove patch-tojson functionality and its import from the main index file to streamline the codebase.

* refactor: simplify longToString and longToNumber functions for better readability and performance
2026-01-14 08:33:45 +02:00
Rajeh Taher a8b8eceb72 waproto, validate-connection: Update headers and proto to latest version 2025-11-06 23:41:41 +02:00
Rajeh Taher 334977f983 general: revert #1665 2025-10-03 18:14:30 +03:00
João Lucas de Oliveira Lopes 4d4339dae6 feat(WAProto): Optimize protobuf generation for 80%+ bundle size reduction (#1665)
* chore: remove comments and veirfy from generated proto files (improve size)

* refactor: replace fromObject with create for proto message instantiation and flag no beautiful

* chore: lint issues
2025-09-07 14:08:11 +03:00
Rajeh Taher 8dc852ee89 proto: fix proto generation, tsc: fix node imports of compiled code 2025-07-19 23:16:35 +03:00
Rajeh Taher 787aed88b8 project: Move to ESM Modules 2025-07-17 13:54:17 +03:00
canove 07014d02c1 chore: update proto 2025-05-21 12:18:08 -03:00
canove 21e2fac339 chore: add temporary proto extract 2025-05-21 12:17:57 -03:00
Rajeh Taher 99142aac96 proto: update manually to 2.3000.1020608496 2025-03-06 04:22:17 +02:00
github-actions[bot] acd0321a53 chore: updated proto/version to v2.2403.2 (#288)
Co-authored-by: edgardmessias <edgardmessias@users.noreply.github.com>
2024-01-19 18:00:54 +02:00
github-actions[bot] a84f75ef2a feat: Whatsapp v2.2329.9 proto/version change (#169)
Co-authored-by: edgardmessias <edgardmessias@users.noreply.github.com>
2023-07-18 10:29:48 -03:00
github-actions[bot] 43bd2341b4 chore: updated proto/version to v2.2325.3
Co-authored-by: edgardmessias <edgardmessias@users.noreply.github.com>
2023-06-17 18:18:18 -03:00
github-actions[bot] 63575e9b85 fix: updated proto/version to v2.2323.4 (#96)
Co-authored-by: edgardmessias <edgardmessias@users.noreply.github.com>
2023-06-07 11:22:19 -03:00
github-actions[bot] 3ef279c6b8 chore: updated proto to v2.2320.10 (#68)
Co-authored-by: edgardmessias <edgardmessias@users.noreply.github.com>
2023-05-26 07:20:32 +02:00
Adhiraj Singh bbe9b3c3f5 chore: update proto 2023-03-09 16:10:14 +05:30
Adhiraj Singh 2f7334407f chore: update proto + version 2022-11-13 12:23:11 +05:30
Adhiraj Singh 115073e9e2 chore: update proto 2022-11-06 15:35:29 +05:30
Adhiraj Singh 53e204c786 chore: update proto 2022-10-23 15:28:10 +05:30
Adhiraj Singh 376df2f5dc chore: update proto 2022-10-12 10:35:41 +05:30
Adhiraj Singh d73585ede9 chore: update proto 2022-09-17 15:34:59 +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 3df968807d chore: update proto 2022-07-15 07:39:27 +05:30
Adhiraj Singh 8fa500a8a2 chore: update proto
the proto was generated using a different method, hence the diff is larger -- but if the method continues to work, we should get very nice little diffs
2022-06-23 22:14:43 +05:30
Adhiraj Singh d834e1d029 chore: upgrade proto 2022-04-25 23:15:07 +05:30
Adhiraj Singh fae90a5214 chore: update proto 2022-04-14 20:34:07 +05:30
Adhiraj Singh 51a397c27c chore: update proto 2022-03-22 12:59:38 +05:30
Adhiraj Singh e4eaf2d2e4 chore: update proto 2022-02-12 19:48:46 +05:30
Adhiraj Singh 3cfde73718 chore: update proto
Thanks to @tulir for the proto extract script
2021-12-08 14:02:14 +05:30
Adhiraj Singh f267f27ada finalize multi-device 2021-09-22 22:19:53 +05:30