Commit Graph

24 Commits

Author SHA1 Message Date
João Lucas de Oliveira Lopes 812e53e4eb Refactor: Fix Event Buffer Deadlock with State Machine (#1633)
* feat: implement state machine for chat synchronization and buffer management

* test: Add Jest configuration and tests for connection deadlock handling

- Created a Jest configuration file to set up testing environment.
- Implemented utility functions for creating isolated authentication sessions and mocking WebSocket connections.
- Added a test case to ensure that the connection does not deadlock when history sync is disabled, verifying the correct handling of message events.

* feat: add GitHub Actions workflow for running tests

* chore: sort import lint

* fix: implement timeout handling for AwaitingInitialSync state in chat socket, maybe fix memory leak

* feat: enhance chat synchronization by refining AwaitingInitialSync handling and adding history sync checks
2025-08-07 01:15:41 +03:00
Rajeh Taher 29f0ac83f8 tsc: fix builds & fix type errors 2025-07-19 17:16:07 +03:00
Rajeh Taher 787aed88b8 project: Move to ESM Modules 2025-07-17 13:54:17 +03:00
Rajeh Taher 34cfa92076 messages-send,tsconfig: add poll message attributes + fix tsconfig 2024-10-18 06:08:40 +00: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 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 bacd046a4e fix: tsc error for DOM 2021-12-19 20:20:22 +05:30
Adhiraj Singh fff2e58997 fix compilation errors 2021-09-25 18:04:26 +05:30
Edgard 8651299ec2 Improved typedoc page 2020-12-18 09:14:59 -03:00
Adhiraj Singh cc722a5138 Callbacks via EventEmitter + possible memory leak fix 2020-10-28 16:10:28 +05:30
Adhiraj 9c34f35a7b message ordering bug fix 2020-10-05 23:13:03 +05:30
Adhiraj 6d2eaf93cb Added mutex + fixed rare duplicate chats bug + fixed connect bug
The mutex will prevent duplicate functions from being called and throwing funky errors.
2020-09-09 14:16:08 +05:30
Adhiraj 6e22ceac98 updated WAMessage definitions 2020-09-08 21:58:39 +05:30
Adhiraj 59df353746 possibly more reliable connect 2020-08-25 18:33:43 +05:30
Adhiraj b06f53401f Updates
-Removed unread messages while connecting
-Added KeyedDB integration
-pdf mimetype fix + mimetype can be string now
2020-07-31 17:32:15 +05:30
Adhiraj aa4db68c0f es2018 2020-07-25 18:20:30 +05:30
Adhiraj da53d521e1 Download media bug fix + switch to ES2020 2020-07-25 17:22:04 +05:30
Adhiraj Singh 1f7e9c8142 Moved to src 2020-07-01 18:14:47 +05:30
Adhiraj Singh 7a2657a4ad . 2020-07-01 17:27:27 +05:30
Adhiraj Singh 489505e78f JS compatibility 2020-07-01 17:08:41 +05:30
Adhiraj Singh 6e54efe810 Update tsconfig.json 2020-07-01 16:39:21 +05:30
Adhiraj Singh eaa2e1a502 Update tsconfig.json 2020-07-01 16:35:29 +05:30
Adhiraj Singh 96ed743c02 Create tsconfig.json 2020-07-01 16:31:02 +05:30