Commit Graph

56 Commits

Author SHA1 Message Date
canove fa706d0b50 chore: format everything 2025-05-06 12:10:19 -03:00
Rajeh Taher b7a9f7bd67 chats: stop using getMessage to decrypt poll votes
The new expected behavior is to decrypt the new votes yourself like in the Example.ts file
2025-03-14 23:40:33 +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
Matheus Alves ae60f3fe62 feat: add last message in chat.update event if is real message (#1203) 2025-03-01 18:21:22 +02:00
Rajeh Taher b8470061c3 process-message: Flip message key of edit to find the original message 2025-02-16 15:20:32 +02:00
Rajeh Taher 17d9a7fdb4 process-message: Add messages.update event for edited messages 2025-02-01 14:17:21 +02:00
Rajeh Taher 18ac07df8e lint: 0 warnings left 2024-10-14 05:15:10 +03:00
vini fda2689169 fix: messaging-history.set event not emitting syncType and progress / add PDO request id (#1042)
* initial commit

* add PDO request id
2024-09-22 14:34:43 +03:00
arthur simas c32ea03de6 feat: emit WAMessageStubType.GROUP_CHANGE_DESCRIPTION event (#967) 2024-08-14 12:11:16 +03:00
Rajeh Taher 1f9cfb1cba PDO protocol (peer data operation): Get more history sync + better message retry mechanism (#919)
* feat(feature/pdo-sync): initial commit

* feat(feature/pdo-sync): Moved to conventional send functions, exported, patched some errors

* fix(feature/pdo-sync): Linting and more bugsquatting

* chore(feature/pdo-sync): linting done

* feat/fix(feat/pdo-sync): Newsletter decrypt + ack

* merge (#946)

* fix: profilePictureUrl (#901)

* Update module to latest version  (#926)

* Update package.json

Update the module to the latest

* Add files via upload

* Fix: Readme use upsert events (#908)

* Fix: getUSyncDevices (#862)

* Update messages-send.ts

* Update messages-send.ts

* Update messages-send.ts

* Fix lint

* Fix lint

* fix(master): update linting workflow to node 20 (current LTS)

---------

Co-authored-by: Akhlaqul Muhammad Fadwa <75623219+zennn08@users.noreply.github.com>
Co-authored-by: Rizz2Dev <muhamad.rizki27483@smp.belajar.id>
Co-authored-by: Oscar Guindzberg <oscar.guindzberg@gmail.com>
Co-authored-by: Bob <115008575+bobslavtriev@users.noreply.github.com>

* chore(feature/pdo-sync): final linting

* fix(feature/pdo-sync): make replies optional

* feat(feat/pdo-sync): add <unavailable> handle

* feat(feature/pdo-sync): Fixed the issues with peer messages and implemented some more logic

* fix(feature/pdo-sync): Make progress optional

* fix(feature/pdo-sync): Nullify and defeat Message absent from node if it is resolved immediately

* feat(feature/pdo-sync): Export message absent from node and export PDO request ID with it

---------

Co-authored-by: Akhlaqul Muhammad Fadwa <75623219+zennn08@users.noreply.github.com>
Co-authored-by: Rizz2Dev <muhamad.rizki27483@smp.belajar.id>
Co-authored-by: Oscar Guindzberg <oscar.guindzberg@gmail.com>
Co-authored-by: Bob <115008575+bobslavtriev@users.noreply.github.com>
2024-08-14 12:07:27 +03:00
Bob baf8b3df00 Feat: Modified number action in group-participants.update (#858)
* Update GroupMetadata.ts

* Update messages-recv.ts

* Update process-message.ts
2024-07-03 10:34:06 +03:00
vini ffec4af454 feat: add event that handles join approval requests (#802)
* initial commit

* lint

* add type in method

* add more actions / fixes participant jid / rename event

* fixes

* more fixes

* fix typing

* change 'reject' to 'rejected'

* chore:linting

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2024-06-03 00:10:36 +03:00
Lucas Maia 9075086be4 Show jid of people who changed some setting in group. (#688)
* JId of people who changed settings in group.

* Show jid of people who changed some setting in group.

* fix lint
2024-04-28 14:06:38 +03:00
Alex 4ff3b329b8 Use senderTimestampMs instead of messageTimestamp (#348)
* Use senderTimestampMs instead of messageTimestamp

* Add .toNumber(), because senderTimestampMs is Long

* chore: Fix linting

---------

Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2024-01-19 18:00:12 +02:00
Bob 3efd3e00ca feat: memberAddMode and joinApprovalMode in groups.update (#532)
* feat: memberAddMode and joinApprovalMode

* feat: memberAddMode and joinApprovalMode

* Update process-message.ts

* fix lint

* Update messages-recv.ts

* Update GroupMetadata.ts

* Update messages-recv.ts

* Update messages-recv.ts

* chore: fix linting and code efficiency

* fix lint

* Fix lint

* Update process-message.ts

* Update process-message.ts

---------

Co-authored-by: Bob <115008575+FortisEtMagnus@users.noreply.github.com>
Co-authored-by: Bob <115008575+bobpetrov@users.noreply.github.com>
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2024-01-19 17:59:57 +02:00
Rajeh Taher 97dd960d01 Merge pull request #363 from aliazhar-id/aliazhar-patch-2
Feat: add authors who perform participant updates
2024-01-01 01:28:07 +02:00
Rajeh Taher b914a1f52a Initial commit 2023-12-18 16:31:41 +02:00
aliazhar 55cae0e45f Feat: add authors who perform participant updates 2023-09-03 14:41:08 +07:00
Adhiraj Singh 9d8aa67f22 feat: process pollupdate automatically 2023-03-02 22:43:31 +05:30
Adhiraj Singh 36d6cfd5fb refactor: poll decryption 2023-03-02 17:41:43 +05:30
Adhiraj Singh 41851d9e34 fix: getChatId 2023-01-18 16:23:31 +05:30
Adhiraj Singh 9591a02382 feat: getChatId for broadcasts 2023-01-18 14:33:16 +05:30
Leonardo Bein 704aa1e434 feat: Add notification group: change inviteCode 2022-11-22 12:02:31 +05:30
Adhiraj Singh e547310a19 fix: add history msg to creds.update to prevent race condition 2022-11-07 17:22:19 +05:30
Adhiraj Singh 02f9df5de4 fix: check for content in "isRealMessage" 2022-11-07 14:40:08 +05:30
Adhiraj Singh 4352a84498 chore: log app state key recv 2022-11-06 20:06:14 +05:30
Adhiraj Singh b9d13a57d8 feat: update real msg logic 2022-10-23 17:24:54 +05:30
Adhiraj Singh e710ed96f9 fix: unarchive chats if reaction to my message 2022-10-17 12:53:47 +05:30
Adhiraj Singh d0330d1863 refactor!: cleaner message history sync
This is a breaking change,
1. three events (chats.set, contacts.set, messages.set) are now just one `messaging-history.set` event
2. no need to debounce for app state sync
3. added a new "conditional" chat update to allow for correct app state sync despite not having the chat available on hand
2022-09-29 16:32:57 +05:30
Adhiraj Singh e08dd10198 refactor!: use proto.Conversation's own chat mutation fields instead of baileys added 2022-09-29 11:06:09 +05:30
Adhiraj Singh bb983cd30d chore: reduce logging 2022-09-28 10:40:29 +05:30
Adhiraj Singh ae3ac78dc3 feat: pass axios config to all axios instances 2022-09-19 17:46:43 +05:30
Adhiraj Singh 696fe0de9f fix: correctly check isLatest 2022-09-01 08:39:36 +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 4e85a10043 fix: reaction sender map 2022-07-17 10:56:07 +05:30
Adhiraj Singh 8742bc2fd5 fix: isLatest flag 2022-07-13 11:04:55 +05:30
Adhiraj Singh 40a1e268aa feat: add "strictNullChecks" 2022-07-09 10:20:07 +05:30
Adhiraj Singh 189b740ea6 chore: remove "treatCiphertextMessagesAsReal" flag
!BREAKING_CHANGE

This was generally a poor design decision on my part to add something like this -- primarily because it could increment the chat unread counter a 100 times for a single message
2022-07-04 11:38:17 +05:30
Adhiraj Singh 5cc58d4aed feat: add bulk "process" capability to BaileysBufferableEventEmitter 2022-07-04 11:34:41 +05:30
Adhiraj Singh 7421f55daa feat: implement event buffer for offline msgs
!BREAKING_CHANGE

1. this allows all offline notifications to be combined into a batch -- to reduce the number of events being sent out
2. to enable the above, the "message.reaction" event has been made an array. Also removes the need for the "operation" field
3. have also now started processing all events under a single queue to prevent state sync problems
2022-06-27 13:38:29 +05:30
Adhiraj Singh 66f49e0b3d fix: correctly set reaction msg key 2022-06-25 22:39:55 +05:30
fadiinho bd98b13895 fix: reaction message doesn't appear when send to a group (#1700)
* fix: reaction message doesn't appear when send to a group

* use undefined instead of null
2022-06-13 20:15:56 +05:30
Adhiraj Singh b125638253 fix: add missing "isLatest" flag 2022-06-13 12:53:20 +05:30
Adhiraj Singh 5cb71ac862 feat: more accurately handle app state sync 2022-06-11 12:02:08 +05:30
Adhiraj Singh 5305730d82 feat: track history being stored
This is done because sometimes we receive history after the first connect too, and to ensure the "isLatest" flag is accurate -- we ensure no history was received previously
2022-06-07 21:18:51 +05:30
Adhiraj Singh 4ea2c33cfa fix: cleanMessage for reaction messages 2022-05-23 12:46:34 +05:30
Adhiraj Singh ebec02908c feat: add clean message util before calling "messages.upsert" 2022-05-23 12:32:43 +05:30
Adhiraj Singh 9a39a46398 feat: add toggle to download history 2022-05-22 17:23:30 +05:30
Adhiraj Singh 46f309929b feat: message reaction fix from other party 2022-05-11 17:50:04 +05:30
Adhiraj Singh bf8ff6d253 fix: readonly chats on sync 2022-05-09 16:03:53 +05:30