Commit Graph

103 Commits

Author SHA1 Message Date
Andres Aya
d02066dec8 fix: auth store transactions + tests 2023-04-20 08:17:06 -05:00
Adhiraj Singh
bb27e58c3e test: override session 2023-03-18 17:40:35 +05:30
Adhiraj Singh
fe1d0649b5 feat: add signal repository + tests 2023-03-18 12:25:47 +05:30
Adhiraj Singh
5041be776e feat: handle futureproofmessage 2022-12-23 16:58:39 +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
b520d81968 test: deadlock in event buffer 2022-11-26 00:55:45 +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
ae3ac78dc3 feat: pass axios config to all axios instances 2022-09-19 17:46:43 +05:30
Adhiraj Singh
d143ef0b7d feat: handle delete events accurately 2022-07-06 22:05:01 +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
5cb71ac862 feat: more accurately handle app state sync 2022-06-11 12:02:08 +05:30
Adhiraj Singh
de7d1002a9 lint: stricter linting rules 2022-03-01 16:32:14 +05:30
Adhiraj Singh
8f11f0be76 chore: add linting 2022-01-19 15:54:02 +05:30
Adhiraj Singh
8b1374f6ae test: add another media test 2021-12-11 00:17:10 +05:30
Adhiraj Singh
b5ac28d426 feat: implement partial media downloads 2021-12-02 11:38:24 +05:30
Adhiraj Singh
f267f27ada finalize multi-device 2021-09-22 22:19:53 +05:30
Adhiraj Singh
75c15e7767 generic media uploads 2021-08-06 18:41:07 +05:30
Adhiraj Singh
b5ee036ae9 update proto 2021-07-29 20:33:19 +05:30
Adhiraj Singh
89cf8004e9 Wrap up connection + in memory store 2021-07-09 20:35:07 +05:30
Adhiraj Singh
5be4a9cc2c remove all files 2021-07-07 23:20:11 +05:30
Adhiraj Singh
3b2618910c Clear tmp media files + regen yarn lock 2021-04-12 21:01:20 +05:30
Ibnu syawal
08bdb426c9 Added method to join group (#417)
* Added method to join group

* Added method to join group in README
2021-03-24 23:19:00 +05:30
Nils
d469fdb3bd typo: retreive -> retrieve (#371) 2021-02-26 23:33:20 +05:30
Adhiraj Singh
63dd136afa Move msgCount increment to generateMessageTag
Prevents duplicate tags from being sent
2021-01-24 17:25:49 +05:30
Adhiraj Singh
e1952ff349 Don't save original if not required for media + update readme 2021-01-15 12:16:09 +05:30
Adhiraj Singh
0344d6336c Stream uploads + downloads + allow for remote url uploads
- Switch to using got
- Use encryption/decryption streams for speed & lesser memory consumption
- Allow for stream based download & simultaneous upload of media
2021-01-13 22:48:28 +05:30
Adhiraj Singh
39802eb449 Better phone connection detection 2021-01-06 18:21:36 +05:30
Adhiraj Singh
6cc5a910f7 Completely remove message-status-update & user-status-update 2021-01-04 14:19:44 +05:30
Adhiraj Singh
ac4b4c7384 Removed deprecations + merge message-status-update into chat-update
1. Update package version to 4.0.0
2. Retry query if the connection unexpectedly closes + make query iterative instead of recursive
3. Remove message-new & message-update deprecations
4. Deprecate loadProfilePicturesForChatsAutomatically
2021-01-04 12:35:48 +05:30
Adhiraj Singh
05bae6b1e7 Unarchive tests 2020-12-31 11:18:47 +05:30
Adhiraj Singh
100c8fd96d Add more contact-update + better phone check 2020-12-30 11:26:46 +05:30
Edgard Messias
14bf3a441a Added method to update the profile name 2020-12-18 16:10:05 -03:00
Adhiraj Singh
3288846380 Merge pull request #279 from edgardmessias/feat_clear_chat
Added method to clear chat and star/unstar message
2020-12-18 17:40:50 +05:30
Adhiraj Singh
b6a8d02038 Cleaner upserts 2020-12-18 16:49:28 +05:30
Adhiraj Singh
ccab24cdb2 Nicer message deletion + catch profile picture update errors 2020-12-18 12:35:24 +05:30
Edgard
5a7077c675 Added method to clear chat and star/unstar message 2020-12-16 13:58:24 -03:00
Edgard
0bf0ec6490 Added method to block/unblock user (close #233) 2020-12-14 16:05:57 -03:00
Adhiraj Singh
b72e2dfcf9 Track updated contacts 2020-12-12 14:06:46 +05:30
Adhiraj Singh
eb7b8506a9 Added support for sending + toggling disappearing messages 2020-12-12 00:21:11 +05:30
Adhiraj Singh
376a43f116 Duplicate message after reconnect fix 2020-12-09 00:01:37 +05:30
Adhiraj Singh
caf82a46a8 Indexing change + missing messages detection 2020-12-08 18:06:20 +05:30
Adhiraj Singh
6d7dc4d9fe Manage group metdata state in Baileys + Remove presence from Contact 2020-12-03 13:16:37 +05:30
Adhiraj Singh
84edfe1ca0 Archive bug fix + Delete bug fix + assert deprecation update 2020-11-30 19:21:10 +05:30
Adhiraj Singh
7dc083b6e5 Update init method to try login multiple times + use WA ttl for QR gen 2020-11-26 17:08:18 +05:30
Adhiraj Singh
242328abdc Presence fixes 2020-11-24 18:56:07 +05:30
Adhiraj Singh
abde6563c9 Support decoding disappearing messages + events bug fix 2020-11-18 23:05:57 +05:30
Adhiraj Singh
6d02d405a7 Major redo with respect to chats/contacts -- read desc
Waiting for chats & contacts is hella unreliable, so I've put them as events
1. receive chats via the `chats-received` event. If new chats are found, the flag for that is sent as well
2. receive contacts via the `contacts-received` event
3. When WA sends older messages, the `chats-update` or `chat-update` event is triggered
4. Baileys keeps track of all the changed conversations between connects

Connects almost always take less than 10 seconds!
2020-11-13 23:15:16 +05:30
Adhiraj Singh
eaf56f6d71 group promote/demote event fix + archive fix + group events rework 2020-11-12 13:46:10 +05:30
Adhiraj Singh
155df2bc4f Android chat read fix + debounceTimeout bug fix 2020-11-03 13:24:56 +05:30
Adhiraj Singh
69da12c33c handle tags via EventEmitter + replace 'intermediate-close' with 'ws-close' 2020-10-30 17:42:45 +05:30