6
1
mirror of https://git.mills.io/saltyim/saltyim.git synced 2024-06-16 03:48:24 +00:00
Commit Graph

13 Commits

Author SHA1 Message Date
xuu
754fcc7323 feat: add compression negotiation for sent messages (#91)
feat: add compression negotiation for sent messages
fix: unix homedir handling

the service will negotiate a compression algo for sending messages
when a user chats someone during the auto discovery, the service returns an `Accept-Encoding: br, gzip, deflate`

the client saves that response and so when it makes POSTs of messages adds the best `Content-Encoding` and compresses the message

example:
```
>> GET /.well-known/salty/c765c69040d98f3af2181237f47ec01398d80f8ab2690fe929e4311ab05dec01.json

<< Accept-Encoding: br, gzip, deflate
<<
<< {"endpoint":"https://salty.home.arpa/inbox/01FZBR8Y2E6TH949JA3925WF71","key":"kex1wurry09ftqjuxgjl0jxmqypv4axqvzqljkgeadxjcpwtfuhcedcslck52d"}

>> POST /inbox/01FZBR8Y2E6TH949JA3925WF71
>> Content-Encoding: br
>>
>> [Brotli Compressed data]
```

this PR depends on https://git.mills.io/prologic/msgbus/pulls/24

Co-authored-by: Jon Lundy <jon@xuu.cc>
Reviewed-on: https://git.mills.io/saltyim/saltyim/pulls/91
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-03-29 22:23:16 +00:00
James Mills
b04ee521ae Fix bild issue on small machines by restructing some of the cli code and only build the cli by default 2022-03-22 23:46:44 +10:00
James Mills
0048d599f1 Update defaultRequestTimeout to 30s 2022-03-22 22:33:58 +10:00
James Mills
8993981e81 Refactor the code (#38)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/prologic/saltyim/pulls/38
2022-03-21 14:46:16 +00:00
xuu
7ccd59efc0 feat: make endpoint uniform. add profiles (#30)
Co-authored-by: Jon Lundy <jon@xuu.cc>
Reviewed-on: https://git.mills.io/prologic/saltyim/pulls/30
Co-authored-by: xuu <xuu@noreply@mills.io>
Co-committed-by: xuu <xuu@noreply@mills.io>
2022-03-21 00:31:59 +00:00
James Mills
b9c868f971 Improve the make-user command 2022-03-20 23:54:54 +10:00
James Mills
b078631c2d Add support for setting the Terminal/Console title (#20)
Closes #18

Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/prologic/saltyim/pulls/20
2022-03-20 08:16:36 +00:00
James Mills
24dee80aba Fix pre/post hook support to accept stdin 2022-03-20 09:55:20 +10:00
James Mills
2f62274265 Add spport for pre/post hooks for read command 2022-03-20 09:35:47 +10:00
James Mills
158c7f9231 Don't double log errors in Request() 2022-03-20 01:24:21 +10:00
James Mills
8f0914ef22 Add make-user command (#9)
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Reviewed-on: https://git.mills.io/prologic/saltyim/pulls/9
2022-03-19 11:42:36 +00:00
James Mills
005a013753 Add support for looking for a default identity 2022-03-19 16:34:33 +10:00
James Mills
e92052dccc Refactor lookup and send and bild a Request utility function 2022-03-19 11:24:07 +10:00