Commit graph

221 commits

Author SHA1 Message Date
Tulir Asokan
2116071b73 Retry on 4xx errors 2023-08-09 15:27:47 +03:00
Tulir Asokan
f9d004a09d Increase ping timeout to 30 seconds 2023-08-08 19:05:08 +03:00
Tulir Asokan
0411c6eeac Update version identifier 2023-08-08 17:10:41 +03:00
Tulir Asokan
b958401b73 Don't resync if session ID doesn't change 2023-08-02 15:07:02 +03:00
Tulir Asokan
107f164180 Fix field type 2023-07-31 19:57:31 +03:00
Tulir Asokan
8b8ac305bb Add better logs for decode errors 2023-07-31 19:57:31 +03:00
Tulir Asokan
57dfe0fc72 Log conversation status when syncing 2023-07-24 16:48:22 +03:00
Tulir Asokan
c742a1fe66 Change log level 2023-07-20 02:03:50 +03:00
Tulir Asokan
8e814bd05b Send correct bridge state if phone isn't responding 2023-07-20 01:11:59 +03:00
Tulir Asokan
7981a11bd9 Make initial chat sync count configurable 2023-07-19 23:34:25 +03:00
Tulir Asokan
498f210e10 Move fetching initial conversations to bridge code 2023-07-19 23:30:27 +03:00
Tulir Asokan
ecae11f6b2 Fix deduplicating updates that flip back and forth 2023-07-19 22:29:30 +03:00
Tulir Asokan
d367469000 Sync read only and RCS status as power levels 2023-07-19 21:40:39 +03:00
Tulir Asokan
907e6af77b Store all own participant IDs for proper multi-sim support 2023-07-19 20:55:52 +03:00
Tulir Asokan
bf277e197f Always close response body in uploads 2023-07-19 14:19:09 +03:00
Tulir Asokan
a4639eb668 Rename long poll file and functions to be more accurate 2023-07-19 14:13:02 +03:00
Tulir Asokan
01464c5cc2 Unnest long polling handler 2023-07-19 14:12:23 +03:00
Tulir Asokan
d99da61869 Refactor all protobuf HTTP request sending into shared functions 2023-07-19 13:59:11 +03:00
Tulir Asokan
3e2348447a Merge response waiting methods with sending 2023-07-19 01:20:32 +03:00
Tulir Asokan
6caf7e89fb Move start login methods to pair.go 2023-07-19 01:19:04 +03:00
Tulir Asokan
b46885ad58 Move download method to same file as upload 2023-07-19 01:18:06 +03:00
Tulir Asokan
afae081429 Merge all RPC call methods into one file 2023-07-19 01:17:12 +03:00
Tulir Asokan
1ef5b56259 Merge pairing-related code into one file 2023-07-19 01:08:13 +03:00
Tulir Asokan
1d32fd14da Remove unnecessary route definitions 2023-07-19 01:06:09 +03:00
Tulir Asokan
e7a6c3f7af Fix panic when logging in 2023-07-18 15:13:53 +03:00
Tulir Asokan
30bfa14141 Don't send listen events in the non-authed poller 2023-07-18 14:51:18 +03:00
Tulir Asokan
78d0bcd56d Remove RPC message builder 2023-07-18 03:08:01 +03:00
Tulir Asokan
9680040ea1 Reorganize protobuf schemas 2023-07-18 02:57:20 +03:00
Tulir Asokan
8e5d76b1d3 Add get conversation method 2023-07-18 02:19:25 +03:00
Tulir Asokan
a6b91da574 Use generics for casting responses 2023-07-18 02:11:43 +03:00
Tulir Asokan
4599f3f0e5 Refactor incoming RPC data parsing to remove useless structs 2023-07-18 02:01:06 +03:00
Tulir Asokan
5f450f3294 Make attachment decryption less hacky 2023-07-17 17:58:11 +03:00
Tulir Asokan
37a6c09dc3 Remove unused request functions 2023-07-17 16:57:28 +03:00
Tulir Asokan
13124562b7 Rename crypto files 2023-07-17 16:57:21 +03:00
Tulir Asokan
4d6233d94b Rename binary package to gmproto 2023-07-17 16:51:31 +03:00
Tulir Asokan
7008a9ca60 Move proto files to binary directory 2023-07-17 16:49:49 +03:00
Tulir Asokan
b5bc6bfd61 Clean up logs and move some functions 2023-07-17 16:43:34 +03:00
Tulir Asokan
84276a631a Use embed package for raw proto descriptions 2023-07-17 02:06:35 +03:00
Tulir Asokan
db53aaf3e7 Implement start new chat API 2023-07-17 01:52:13 +03:00
Tulir Asokan
6786c10fda Add methods for getting contacts and starting chats 2023-07-17 01:10:01 +03:00
Tulir Asokan
019f237be1 Fix field name casing 2023-07-16 16:19:33 +03:00
Tulir Asokan
fa5928e405 Remove some panics 2023-07-16 16:18:45 +03:00
Tulir Asokan
6225b83d2f Refactor login flow 2023-07-16 16:13:11 +03:00
Tulir Asokan
7fe4f0b047 Unnest device pair info in AuthData 2023-07-16 14:40:28 +03:00
Tulir Asokan
3fefda3a96 Refactor more things 2023-07-16 14:36:13 +03:00
Tulir Asokan
e6cec49353 Move JWK base64 decoding to JSON parsing step 2023-07-16 13:35:28 +03:00
Tulir Asokan
360fe208a8 Remove more unused utility functions 2023-07-16 13:23:44 +03:00
Tulir Asokan
014b257ff5 Allow configuring device details shown on phone 2023-07-16 02:51:26 +03:00
Tulir Asokan
511e85c242 Handle pair revoke events 2023-07-16 02:41:34 +03:00
Tulir Asokan
9f189d913b Remove manual X.509 public key encoding 2023-07-16 02:35:35 +03:00
Tulir Asokan
2d69a3c42f Remove some unnecessary event wrappers 2023-07-16 02:24:39 +03:00
Tulir Asokan
8302bc95ee Fix URL constant names 2023-07-16 02:21:53 +03:00
Tulir Asokan
15fbc4b654 Don't reconnect when closing connection manually 2023-07-16 02:16:52 +03:00
Tulir Asokan
5d7edac1e8 Move some things out of payload package 2023-07-16 02:16:10 +03:00
Tulir Asokan
abb2c8a21f Send unpair request when logging out 2023-07-16 02:11:25 +03:00
Tulir Asokan
00b7dd1268 Remove duplicate AuthMessage type 2023-07-16 01:56:11 +03:00
Tulir Asokan
10affb59b1 Make response waiting less hacky 2023-07-16 01:55:41 +03:00
Tulir Asokan
50c2d45316 Fix image decryption race condition 2023-07-16 01:45:19 +03:00
Tulir Asokan
f22d4f6ac8 Remove commented logs 2023-07-16 01:04:29 +03:00
Tulir Asokan
14084b9832 Update list conversations payload 2023-07-16 00:55:55 +03:00
Tulir Asokan
4931b1a666 Remove duplicate log 2023-07-16 00:28:00 +03:00
Tulir Asokan
3f912f87cf Remove unnecessary wrapping of API methods 2023-07-16 00:26:22 +03:00
Tulir Asokan
d04b1bde39 Fix some error messages 2023-07-16 00:16:36 +03:00
Tulir Asokan
45d5a556ba Remove useless utility functions 2023-07-15 20:47:56 +03:00
Tulir Asokan
aa89c98353 Add support for sending attachments from Matrix 2023-07-15 20:29:43 +03:00
Tulir Asokan
63d2aab736 Add support for MMS subjects 2023-07-15 19:57:13 +03:00
Tulir Asokan
b2e6d206bd Remove message builder 2023-07-15 19:51:43 +03:00
Tulir Asokan
b8d4b49de3 Add method for sending typing notification 2023-07-15 19:48:11 +03:00
Tulir Asokan
5de0cf774b Make ack log more readable 2023-07-15 18:49:28 +03:00
Tulir Asokan
50ea658fc9 Remove unnecessary JWK functions 2023-07-15 16:45:50 +03:00
Tulir Asokan
ffd84f5039 Remove unnecessary utility functions 2023-07-15 16:39:11 +03:00
Tulir Asokan
c46e47aba8 Clean up some protobuf things 2023-07-15 16:37:44 +03:00
Tulir Asokan
cc0325f7eb Don't log error when closing connection manually 2023-07-15 16:20:02 +03:00
Tulir Asokan
cb7e12290b Log all pblite response contents 2023-07-15 16:17:02 +03:00
Tulir Asokan
08cbe12181 Remove manual json unmarshaling step in pblite 2023-07-15 16:11:36 +03:00
Tulir Asokan
e086846574 Add lock around ackMap 2023-07-15 15:57:07 +03:00
Tulir Asokan
605d84c485 Remove manual json marshaling step in pblite 2023-07-15 15:56:55 +03:00
Tulir Asokan
25236fffa9 Remove hackiness in long polling and ack sending 2023-07-15 15:49:51 +03:00
Tulir Asokan
bbc4da21b7 Add better bridge states 2023-07-15 15:05:40 +03:00
Tulir Asokan
7860fb64c8 Handle read receipts from Matrix 2023-07-15 14:38:24 +03:00
Tulir Asokan
a21388cdfc Sync read status after backfill 2023-07-15 02:17:36 +03:00
Tulir Asokan
8b0717144f Make update deduplication list smaller 2023-07-15 01:51:36 +03:00
Tulir Asokan
c0313dca87 Add support for deletions in both directions 2023-07-15 01:28:13 +03:00
Tulir Asokan
376f908a03 Add basic support for incoming reactions 2023-07-13 00:44:57 +03:00
Tulir Asokan
c802d2bced Handle events synchronously and ignore duplicates 2023-07-12 02:18:14 +03:00
Tulir Asokan
4f4b8818e5 Remove unnecessary fetched message media downloading 2023-07-11 01:20:11 +03:00
Tulir Asokan
43ec0da6e9 Notify ditto activity when restarting long polling 2023-07-10 19:52:03 +03:00
Tulir Asokan
fc0882f285 Refresh auth token in long polling loop 2023-07-10 15:12:46 +03:00
Tulir Asokan
0d334623e8 Update some enum values 2023-07-09 23:59:22 +03:00
Tulir Asokan
a350e4fc00 Fix usages of log package 2023-07-09 23:33:01 +03:00
Tulir Asokan
5e5e5af2ea Add untested support for incoming replies 2023-07-09 20:48:27 +03:00
zero
a5e4c30a2c Add conversation thumbnail fetching and other library updates 2023-07-09 20:35:29 +03:00
Tulir Asokan
7372bc4927 Add basic support for incoming media messages 2023-07-09 20:28:20 +03:00
Tulir Asokan
5542492a32 Further simplify refresh request signing 2023-07-09 18:39:05 +03:00
Tulir Asokan
9b46d5d5bf Remove unnecessary custom signature encoding 2023-07-09 18:19:23 +03:00
Tulir Asokan
1615e146b6 Update library
Co-authored-by: zero <108243503+0xzer@users.noreply.github.com>
2023-07-09 14:49:55 +03:00
Tulir Asokan
922ffdcf6b Update bridge states 2023-07-04 00:03:36 +03:00
Tulir Asokan
28629b8229 Rename participant displayname fields 2023-07-02 17:21:39 +03:00
Tulir Asokan
27b48bc6e8 Change more things 2023-07-02 17:19:00 +03:00
Tulir Asokan
6e7143d532 Change more stuff 2023-07-01 18:19:57 +03:00
Tulir Asokan
a0fcf0c275 Improve Participant types 2023-07-01 18:19:47 +03:00
Tulir Asokan
8cd7da3f28 Use spaces in .proto file indents 2023-07-01 12:52:53 +03:00
Tulir Asokan
b1e2634f33 Fix long polling retries, unpair handling and other things 2023-07-01 12:51:13 +03:00
Tulir Asokan
9aa0894115 Make constants actual constants 2023-06-30 16:31:35 +03:00
Tulir Asokan
f3e866bf2f Fix most variable name casing 2023-06-30 16:26:49 +03:00
Tulir Asokan
c09a0063a7 Fix event names 2023-06-30 16:09:29 +03:00
Tulir Asokan
8da8d5c8ba Remove unused things 2023-06-30 16:09:06 +03:00
Tulir Asokan
a759468da3 Fix whitespace 2023-06-30 16:00:52 +03:00
Tulir Asokan
1866cf86ec Unhardcode receive messages request payload format 2023-06-30 15:50:12 +03:00
Tulir Asokan
0bc6a41b32 Fix mistake in pblite deserializer 2023-06-30 14:49:06 +03:00
Tulir Asokan
ceedfb1192 Add PairSuccessful event 2023-06-30 14:48:58 +03:00
Tulir Asokan
2f5c5e2c6d Stop using stdlib log 2023-06-30 14:48:50 +03:00
Tulir Asokan
bbca40d74b Update package name 2023-06-30 14:05:33 +03:00
Tulir Asokan
e985716c9b Add separate go module for libgm 2023-06-30 14:02:10 +03:00
Tulir Asokan
d1897a2b80 Remove unnecessary base64 util 2023-06-30 13:53:17 +03:00
Tulir Asokan
13f47319b2 Remove unnecessary QR image generation 2023-06-30 13:44:48 +03:00
Tulir Asokan
766f16d113 Remove weird logger 2023-06-30 13:33:57 +03:00
Tulir Asokan
82ddf46de7 Remove cache 2023-06-30 13:31:25 +03:00
Tulir Asokan
5e5344742e Update pblite package to handle more types 2023-06-30 13:04:17 +03:00
Tulir Asokan
cdf9b1e4a0 Run goimports 2023-06-30 12:55:49 +03:00
zero
02ef5ab82c Add initial Google Messages library 2023-06-30 12:54:08 +03:00