Commit graph

1556 commits

Author SHA1 Message Date
AsamK
210466e7d9 Allow JSON-RPC commands without account param if only one account exists 2022-12-30 13:50:40 +01:00
AsamK
0702159596 Bump version 2022-12-18 20:09:15 +01:00
AsamK
8d7e533196 Update dependencies 2022-12-18 20:05:53 +01:00
AsamK
47feda6ae4 Restrict workflow permissions 2022-12-04 23:16:53 +01:00
AsamK
44c945f45d Update dependencies 2022-11-24 17:31:11 +01:00
ced-b
35def4445d
Fix handling of attachments in JSON RPC (#1109)
* Fix handling of attachments in JSON RPC

It turns out that using a custom serializer on an
input stream did not work well. For one the stream seems
to be getting closed before the JSON gets written. But
also the method for writing it was throwing an
UnsupportedOperationException further down in Jackson.

The above simplifies the matter by simply outputting the
Base64 string first and then setting it on the model.

* Add missing files to attachment fix

Co-authored-by: cedb <cedb@keylimebox.org>
2022-11-24 17:29:45 +01:00
ced-b
3e60303b90
Add alive check (#1107)
Adds a simple HTTP endpoint that can be used by the container
environment to see if the app is started and available.

Co-authored-by: cedb <cedb@keylimebox.org>
2022-11-22 07:58:34 +01:00
AsamK
b6e9dfa97d Add fallback locale for voice verification
Fixes #1101
2022-11-20 11:27:33 +01:00
AsamK
5771bb858f Allow using data URIs for updateGroup/updateProfile avatars
Fixes #1082
2022-11-14 19:31:40 +01:00
AsamK
dcaf1cc189 Bump version 2022-11-09 19:00:59 +01:00
AsamK
5e1fc79c33 Fix SignalAccount initialization
Fixes #1092
2022-11-08 17:18:24 +01:00
AsamK
8997d7f91f Update README.md 2022-11-08 17:18:22 +01:00
AsamK
54a08f560e Bump version 2022-11-07 20:12:41 +01:00
AsamK
ccb37c00f6 Update dependencies 2022-11-07 19:43:15 +01:00
AsamK
6281cbfd5f Catch all exceptions when reading session record
Fixes #1083
2022-11-03 15:55:12 +01:00
AsamK
6502f3f487 Publish docker image to ghcr 2022-11-03 15:33:28 +01:00
AsamK
00535c9a42 Package native file as executable 2022-11-03 15:18:59 +01:00
AsamK
e6cf11cb3d Add missing check to httpAddres 2022-11-03 15:10:17 +01:00
AsamK
c5eb0fd351 Rework release workflow 2022-11-03 13:31:37 +01:00
AsamK
a780be70dd Add http endpoint events with SSE 2022-11-03 00:03:37 +01:00
AsamK
1d98e5307a Handle missing separator in query string parser 2022-11-02 23:16:38 +01:00
AsamK
36abb8ae8f Add check for exact path match
HttpExchange just checks startsWith, so would also match /api/v1/rpcfoobar
2022-11-02 21:17:28 +01:00
AsamK
0c4642aa20 Fix length for empty response to prevent chunked stream
The java HttpExchange expects length -1 to send Content-length: 0 ...
2022-11-02 21:15:08 +01:00
AsamK
1b029b765f Extract http endpoint handler function 2022-11-02 21:13:52 +01:00
AsamK
9563496efb Update CHANGELOG.md 2022-11-02 17:47:52 +01:00
AsamK
c628e27d2e Update man page 2022-11-02 17:46:20 +01:00
ced-b
1ad0e94b64
Exposing Signal CLI as HTTP Server (#1078)
* Add initial proof of concept for http server

* Add support for registration commands

* Add support  for MultiLocalCommands

* Improve handling of HTTP responses

Makes it so that responses area all uniformly JSON and wrapped
into the proper response envelope.

* Add caching for workflows

* Run http server with daemon command

This fits the existing command line API better

* Wrap the existing JSON RPC handler in HTTP Service

This is a redesign of earlier attempts to make an HTTP service. Fixing
that service turned out that it would have to be a copy of the
SignalJsonRpcDispatcherHandler. So instead of copy pasting all the
code the existing service is simply being wrapped.

* Switch http server to use command handler

* Clean up and simplification

* Pass full InetSocketAddress

* Minor fixes and improvements

Based on code review.

Co-authored-by: cedb <cedb@keylimebox.org>
2022-11-02 17:44:12 +01:00
AsamK
43face8ead Small improvements 2022-11-01 22:48:47 +01:00
ced-b
2e4d346bc8
Add command to get an attachment (#1080)
* Add command to get an attachment

* Refactor retrieving of attachments to use StreamDetails

* Refactor AttachmentCommand to GetAttachmentCommand

* Minor improvements to GetAttachmentCommand

* Use JSON serializer to serialize binary data

Serializing the stream is better for memory handling than
loading the whole thing into the file.

* Clean up unneeded class

* Added command to doc

Co-authored-by: cedb <cedb@keylimebox.org>
2022-11-01 22:47:43 +01:00
AsamK
bf76c04664 Refactor JsonRpcReader to for handling a single message 2022-11-01 18:06:40 +01:00
AsamK
ae678871ec Extract JSON-RPC command handler 2022-11-01 17:10:15 +01:00
AsamK
9620eb06ac Update libsignal-service 2022-11-01 13:58:09 +01:00
AsamK
9096229637 Improve behavior with synchronous and asynchronous receivers 2022-11-01 13:58:09 +01:00
AsamK
eec3d782d3 Add caching for workflows 2022-10-31 16:40:39 +01:00
AsamK
43a7478791 Update reflect-config.json 2022-10-31 15:29:18 +01:00
AsamK
175057e781 Implement receive command for JSON-RPC mode
The command returns a list of messages, as soon as the timeout is reached
after the last message has been received or the maximum number of messages
has been received.
2022-10-31 11:56:25 +01:00
AsamK
de2bfc7f79 Add optional message limit for receive command 2022-10-31 11:17:52 +01:00
AsamK
5ed9db4f08 Implement replying to stories 2022-10-30 18:18:21 +01:00
AsamK
fea19c9e20 Implement reacting to stories 2022-10-30 14:41:02 +01:00
AsamK
207764e0be Add option to disable adding message to send log 2022-10-30 11:00:25 +01:00
AsamK
49aaff2bbe Increase sqlite busy timeout 2022-10-29 13:54:06 +02:00
AsamK
25e84f2f5d Add account to plain text output
Fixes #1075
2022-10-29 13:49:14 +02:00
AsamK
e63f2fafb9 Add color to listContacts output
Fixes #1072
2022-10-28 20:12:11 +02:00
AsamK
0b5a063b62 Use complete address instead of only identifier for retry envelope
Fixes #1074
2022-10-28 18:13:25 +02:00
AsamK
e0c2f58e8d Store attachments with a file extension
Taken from the filename if present, otherwise guessed from the contentType
2022-10-22 22:00:31 +02:00
AsamK
0084a2e722 Update reflect-config.json 2022-10-22 17:43:15 +02:00
AsamK
7ff1500122 Improve logging in prekey store 2022-10-22 17:43:15 +02:00
AsamK
7805622f07 Send long text messages as attachment instead
This matches the behavior of the official clients.
2022-10-22 17:43:15 +02:00
AsamK
a8e68dce3a Extract MimeUtils 2022-10-22 17:43:15 +02:00
AsamK
b9eee539bd Add PNI to recipients 2022-10-21 22:02:33 +02:00