6
1
mirror of https://git.mills.io/saltyim/saltyim.git synced 2024-06-30 18:51:03 +00:00
prologic-saltyim/internal
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
..
exec support for contacts, multiple chat threads, and persistence (#77) 2022-03-28 21:49:01 +00:00
pwa Add support for new contacts appearing in contact list automatically (#89) 2022-03-29 22:06:06 +00:00
tui support for contacts, multiple chat threads, and persistence (#77) 2022-03-28 21:49:01 +00:00
web feat: add compression negotiation for sent messages (#91) 2022-03-29 22:23:16 +00:00
api.go xuu/bot (#64) 2022-03-26 14:43:05 +00:00
bitcask_store.go Add a basic structure for a go-app PWA + integrated Broker (#36) 2022-03-21 22:27:35 +00:00
config.go Code cleanup 2022-03-27 01:09:07 +10:00
doc.go Refactor the code (#38) 2022-03-21 14:46:16 +00:00
embed_resources.go Re-fix build constraint for PWA app.wasm 2022-03-22 11:08:04 +10:00
handlers.go feat: add compression negotiation for sent messages (#91) 2022-03-29 22:23:16 +00:00
jobs.go Add a basic structure for a go-app PWA + integrated Broker (#36) 2022-03-21 22:27:35 +00:00
memory_store.go Add a basic structure for a go-app PWA + integrated Broker (#36) 2022-03-21 22:27:35 +00:00
options.go Code cleanup 2022-03-27 01:09:07 +10:00
router.go Fix CORS support 2022-03-25 23:10:48 +10:00
server.go support for contacts, multiple chat threads, and persistence (#77) 2022-03-28 21:49:01 +00:00
store.go Add a basic structure for a go-app PWA + integrated Broker (#36) 2022-03-21 22:27:35 +00:00
tasks.go feat: add compression negotiation for sent messages (#91) 2022-03-29 22:23:16 +00:00
utils.go Fix svc user (bot) so it actually starts 2022-03-27 02:59:23 +10:00