Commit Graph

159 Commits

Author SHA1 Message Date
vini dbf25771a1 refactor: Change Sync Functions to Promises to Prevent Blocking Event Loop (#896)
* initial commit

* lint

* lint 2
2024-07-03 10:29:16 +03:00
Bob 13be112b18 Feat: others browsers in requestPairingCode() (#879)
* update

* l

* string

* added Safari

* Update getPlatformId

* Update getPlatformId (fix)
2024-06-30 06:10:50 +03:00
Rajeh Taher d7037cf6fa fix(fix-routing-info): initial commit (#837) 2024-06-03 00:59:09 +03:00
Rajeh Taher 0eaa5af909 feat(add-routing-info): initial commit (#773) 2024-05-15 18:34:37 +03:00
Javier Cuevas 8c61f6719f Fix typo: onMessageRecieved -> onMessageReceived (#652)
Co-authored-by: Rajeh Taher <rajeh@reforward.dev>
2024-04-28 14:08:10 +03:00
Javier Cuevas bb9cc01069 Fix logging of send/recv xml nodes with pino (#653) 2024-04-28 14:05:40 +03:00
Rajeh Taher 306e1c1355 WEB WAM IMPLEMENTATION!!!!! (#708)
* feat(WAM): initial commit

* fix(wam-development): I made a whoopsie

* Update Example/example.ts

Co-authored-by: Javier Cuevas <javiercr@gmail.com>

---------

Co-authored-by: Javier Cuevas <javiercr@gmail.com>
2024-04-28 14:03:24 +03:00
ShellTear a60cdfb053 Merge pull request #563 from kyraex/retain-creds
Retain existing authState.creds.me properties and add lid
2024-01-03 00:13:21 +02:00
Rajeh Taher abe42564be fix: fix pairing code 2024-01-02 03:55:20 +02:00
Ahmad Syauqi 9df3d2410a Retain existing authState.creds.me properties when updating lid during creds update event 2023-12-28 15:47:45 +08:00
Rajeh Taher 6546793ec6 fixes 2023-10-01 14:16:29 +00:00
Rajeh Taher 0b2f4d0b42 Update socket.ts 2023-10-01 16:55:40 +03:00
Rajeh Taher f50842fd7a Socket-passthrough 2023-09-28 03:08:50 +03:00
Alessandro Autiero a7e39c18d9 Fixed infinite reconnection cycle 2023-07-16 21:20:21 +02:00
Alessandro Autiero c506182035 Finished requestPairingCode 2023-07-16 20:14:17 +02:00
Alessandro Autiero f498e1e56c Added requestPairingCode method and handler
Fixed typo (trimUndefineds)
Added bytesToCrockford
Replaced advSecretKey with advKeyPair
Added pairingCode prop
Fixed formatting
Added pairing code example
2023-07-16 18:44:17 +02:00
Edgard Lorraine Messias 54f8215eef fix: Re-added the option to use proxy agent forn non-mobile api (#148) 2023-06-15 21:46:43 -03:00
SamuelScheit 90fe440f9a chore: remove console.logs 2023-05-19 10:15:40 +02:00
SamuelScheit 6ecc5a8757 fix: socket options 2023-05-12 18:02:41 +02:00
SamuelScheit 470e19d3fc auto connect socket 2023-04-30 12:33:20 +02:00
SamuelScheit 65aa4a7d99 unify web + mobile and use tcp socket 2023-04-30 12:30:30 +02:00
SamuelScheit ef673f62ca feat: native-mobile-api 2023-04-20 13:01:11 +02:00
Adhiraj Singh fe1d0649b5 feat: add signal repository + tests 2023-03-18 12:25:47 +05:30
Adhiraj Singh f013b61e35 chore: update axios 2023-02-18 12:34:04 +05:30
Adhiraj Singh b2c1cfbf9c fix: timeout send call 2023-02-01 14:33:14 +05:30
Adhiraj Singh c24ffc1bed feat: better mapping for WS errors 2023-01-17 22:01:51 +05:30
Adhiraj Singh 30e2cb5c4c refactor: impl counter based event buffer
1. counter based event buffer keeps track of the number of blocks that request event processing in buffer
2. event buffer only releases events when the last block completes (i.e. counter = 0)

this approach is far simpler than the promised based garbled crap I wrote, should also prevent the deadlock issues it introduced 🙏
2022-12-02 11:31:42 +05:30
Adhiraj Singh b141ac2c00 chore: only buffer if logged in 2022-11-25 10:17:47 +05:30
Adhiraj Singh 10d61d02cf chore: expose uploadPreKeysToServerIfRequired 2022-11-11 00:42:57 +05:30
Adhiraj Singh 3977444bc5 fix: handle errors in validateconnection 2022-10-16 15:25:10 +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 f8fd5ec008 feat: copy in axios options headers to WebSocket 2022-09-20 11:09:34 +05:30
Adhiraj Singh 1b710729e5 feat: logout if myAppStateKeyId not present 2022-09-14 15:57:17 +05:30
fadiinho f2917f0a6d feat: add option to set timeout between each qr generation 2022-07-30 14:12:50 +05:30
Adhiraj Singh d04718e27a feat: add desktop + full history sync opts 2022-07-26 13:30:01 +05:30
Adhiraj Singh 1c36d57dd1 chore: do not log reg ID 2022-07-14 22:46:59 +05:30
Adhiraj Singh c982d8c3a0 fix: dup close events 2022-07-14 11:22:17 +05:30
Adhiraj Singh 40a1e268aa feat: add "strictNullChecks" 2022-07-09 10:20:07 +05:30
Adhiraj Singh 5cc58d4aed feat: add bulk "process" capability to BaileysBufferableEventEmitter 2022-07-04 11:34:41 +05:30
Adhiraj Singh d00aed7ff5 chore: timeout awaitNextMessage 2022-06-27 18:53:41 +05:30
Adhiraj Singh eaf0f37d24 refactor: use event-buffer for state sync resyncs 2022-06-27 14:51:26 +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 23acc1fb39 feat: extract code from WS error 2022-06-16 20:43:51 +05:30
Adhiraj Singh 26b286c98c chore: use Boom for WS errors 2022-05-31 21:36:11 +05:30
Adhiraj Singh 07f1f8c043 chore: use query to prevent redundant logs 2022-05-28 00:22:25 +05:30
Adhiraj Singh ed557967d1 chore: make "auth" mandatory in SocketConfig 2022-05-25 12:13:17 +05:30
Adhiraj Singh a8e209705a feat: add retry capability to SignalKeyStore 2022-05-22 20:52:21 +05:30
Adhiraj Singh 64a6070845 fix: use handshake timeout 2022-05-09 15:42:42 +05:30
Adhiraj Singh 3ac5eafc63 chore: more descriptive logging of connection close 2022-05-02 13:24:59 +05:30
Adhiraj Singh fd9daf8ad3 refactor: remove redundant stream:error handling 2022-04-25 13:27:25 +05:30