Commit Graph

881 Commits

Author SHA1 Message Date
Adhiraj Singh a723b50741 chore: add type distinguisher for sockets 2021-12-18 19:54:08 +05:30
Adhiraj Singh e393f0f9a8 chore: make APIs similar for legacy + MD 2021-12-18 16:44:31 +05:30
Adhiraj Singh c803e22e8a feat: functional legacy socket 2021-12-17 20:58:33 +05:30
Adhiraj Singh be0e2210d9 Merge branch 'multi-device' into multi-device-legacy 2021-12-17 19:28:00 +05:30
Adhiraj Singh 19a9980492 feat: add legacy connection 2021-12-17 19:27:04 +05:30
Adhiraj Singh ed30e368ad fix: tsc error 2021-12-17 11:16:49 +05:30
LyFE ca12da6269 fix updateBlockStatus,fetchPrivacySettings (#1034)
* fix updateBlockStatus

* fix fetchPrivacySettings

* Update chats.ts
2021-12-16 23:49:48 +05:30
Adhiraj Singh 9474017930 feat: async import got wherever required 2021-12-16 00:38:53 +05:30
Adhiraj Singh ef1b01b6df fix: correctly handle retry from own devices 2021-12-14 00:31:29 +05:30
Adhiraj Singh d15dd6e1d2 feat: add "direct_path" to media messages 2021-12-13 17:31:20 +05:30
Adhiraj Singh a21e3b0bac perf: put main app state sync in transaction 2021-12-12 11:26:19 +05:30
Adhiraj Singh 5624ecf96c fix: throw connection closed instead of WS error 2021-12-12 11:18:21 +05:30
Adhiraj Singh f284217d35 feat: implement transactions on auth state 2021-12-11 18:28:07 +05:30
Adhiraj Singh 2b8256d56b feat: cleaner auth state management + store SK keys
!BREAKING_CHANGE
2021-12-11 17:54:38 +05:30
Adhiraj Singh 792c4bf0a4 feat: add custom host names 2021-12-11 11:32:12 +05:30
Adhiraj Singh 2b33a5202c fix: do not retry not fromMe 2021-12-11 10:08:53 +05:30
Adhiraj Singh 7db5bb5d9a chore: do not throw unhandled error on send messages again, log error 2021-12-10 13:15:02 +05:30
Adhiraj Singh 49e7ad4b25 fix: typeerror on some group create 2021-12-07 22:09:18 +05:30
LightningNeko 7e414a940b fix group announce and restrict always false (#971)
* fix group announce and restrict always false

* refactor: make group setting change params in line with WA

Co-authored-by: Adhiraj Singh <adhirajsingh1001@gmail.com>
2021-12-06 08:53:12 +05:30
Adhiraj Singh cccd9305a2 fix: do not throw error on missing message for retry 2021-12-05 18:05:47 +05:30
LightningNeko e20e479d74 fix waiting for this message (#966) 2021-12-05 01:47:14 +05:30
Adhiraj Singh 78fd72c8e5 feat: implement message retry handling
so if a message fails to decrypt on the other user's end -- it can be retried
2021-12-04 13:47:24 +05:30
HUGEIT 903871d180 potential fix for QR scan. the server may expect these messages to be sent on reconnect after scan (#959)
* potential fix for QR scan. the server may expect these messages to be sent on reconnect after scan.

* refactor: extract dictionary reduce code into utility

* refactor: convert the props + abt send req to somewhat useful query

Co-authored-by: Adhiraj Singh <adhirajsingh1001@gmail.com>
2021-12-03 18:40:26 +05:30
Adhiraj Singh d9cfed64ff fix: bad request on sending messages in some cases
Issue source found out by @jackcokk
2021-12-03 15:20:17 +05:30
Adhiraj Singh a8decb9c11 docs: add some comments for "chatModify" + logging for app patch 2021-11-29 23:57:30 +05:30
Adhiraj Singh b9d37a06a3 fix: incorrect updates being forwarded to messages.update 2021-11-26 10:31:46 +05:30
Adhiraj Singh 6786576d13 style: fix indentation 2021-11-26 10:30:59 +05:30
Maurilho Batista e810f2dec5 Add support for stream as media message input (#905)
* Add support for stream as media message input

* refactor: use async/await on readable toBuffer

* refactor: be more explicit about using a readable stream

Co-authored-by: Adhiraj Singh <adhirajsingh1001@gmail.com>
2021-11-26 10:30:15 +05:30
Adhiraj Singh 6e830c1e1b feat: enforce default timeout to prevent any hanging promises 2021-11-25 19:54:56 +05:30
Adhiraj Singh b91a1cbcf3 fix: possible leak on waitForMessage 2021-11-25 19:51:49 +05:30
Adhiraj Singh 1f8663092f fix: receipt not being sent on empty message 2021-11-25 15:41:34 +05:30
Adhiraj Singh a07a63fa28 perf: single process event for processSyncActions 2021-11-25 15:20:47 +05:30
Adhiraj Singh f5fcaa36f3 feat: (hopefully) correctly implement account timestamp sync 2021-11-25 13:52:18 +05:30
Adhiraj Singh 09b3815d89 fix: handle case with 0 app state sync keys 2021-11-25 13:42:58 +05:30
Adhiraj Singh 396e1d2e95 cleanup: remove redundant sync key request handler 2021-11-25 13:42:44 +05:30
Adhiraj Singh ddf6daba65 feat: implement pin chat modification 2021-11-25 13:37:05 +05:30
Adhiraj Singh 032b2a314b refactor: include full sync action in chatmutation 2021-11-25 13:37:05 +05:30
Adhiraj Singh 49f0f4080c docs: log new mutations in trace mode 2021-11-25 13:37:05 +05:30
Adhiraj Singh 25f76b2f66 refactor: more specific arguments for encode patch 2021-11-25 13:37:05 +05:30
Adhiraj Singh 669fcaa438 fix: ack all calls 2021-11-25 12:23:12 +05:30
Adhiraj Singh a417d6dc5a fix: return mutations on patch 2021-11-25 00:38:13 +05:30
Adhiraj Singh 920e60815b feat: add newLTHashState util 2021-11-24 20:02:36 +05:30
Adhiraj Singh 983b28ba0e feat: implement "snapshot" resyncing 2021-11-24 18:48:00 +05:30
Adhiraj Singh aae2b7a559 fix: resync all collections on mainappresync 2021-11-24 18:47:08 +05:30
Adhiraj Singh aa3309db3c perf: do not resync on every reconnect 2021-11-24 18:46:38 +05:30
Adhiraj Singh e222ec4151 refactor: use only "getAppStateSyncKey" in syncd patch 2021-11-23 12:17:57 +05:30
Adhiraj Singh d2e3abfe49 fix: timestamp & other details not appearing + remove participant property from root message 2021-11-22 16:01:58 +05:30
Adhiraj Singh d5e3d049c4 fix: add "offer" call ack 2021-11-22 00:16:22 +05:30
Adhiraj Singh 088bae44e8 fix: correctly map left group notification 2021-11-21 21:39:31 +05:30
Adhiraj Singh 27cf3954e8 fix: account for 0 messages in stanza 2021-11-21 16:52:59 +05:30