Commit graph

776 commits

Author SHA1 Message Date
AsamK
9a63f97a19 Update dependencies 2023-08-11 00:43:19 +02:00
AsamK
b51c791629 Adapt receive subscription notification to have payload in result field 2023-08-11 00:36:22 +02:00
AsamK
b55d75ef99 Update dependencies 2023-08-09 21:14:17 +02:00
AsamK
6bde5960aa Fix issues with pni parsing 2023-08-07 21:03:39 +02:00
AsamK
ac815f7598 Fix json deserialization for request params
Fixes #1261
2023-06-17 12:59:55 +02:00
Adimarantis
8726c4ede0
Update identities after trust (#1264) 2023-06-17 09:21:28 +02:00
AsamK
0c5993c0ad Add support for invalid pre key failure when sending message 2023-06-11 17:47:48 +02:00
AsamK
da25b2a763 Add missing return to app command handling 2023-06-11 17:17:04 +02:00
AsamK
3d5c440aa2 Improve uuid/number handling 2023-06-11 16:39:54 +02:00
AsamK
4f8da7819e Reformat code 2023-06-05 19:30:18 +02:00
Adimarantis
a96c4938b1
Dbus identities (#1259)
* Dbus Identities and Trust

* Update src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java

* PR feedback updates

* Documentation and consistent case sensitivity

* doc for listIdentities and getIdentity
2023-06-05 19:26:00 +02:00
AsamK
106af6a801 Refactor trust command implementation 2023-06-03 16:10:47 +02:00
AsamK
2ae5297f7d Refactor App init method 2023-06-02 22:52:45 +02:00
AsamK
a7db3a5610 Extract dbus client command handling 2023-06-02 22:43:18 +02:00
AsamK
d0d3e20713 Add helper method to create valid dbus object path 2023-06-02 21:29:58 +02:00
AsamK
c852bd8a85 Remove libsignal logs on console, when log-file is given 2023-05-30 13:03:00 +02:00
AsamK
ee12805d05 Bump version to 0.11.11 2023-05-24 23:05:58 +02:00
AsamK
83c75acd0a Log signal-cli version on startup 2023-05-23 19:34:13 +02:00
AsamK
ff162cb44d Refactor addDeviceLink method 2023-05-23 19:34:13 +02:00
AsamK
e5a67d6ce1 Refactor manager lib package structure 2023-05-23 19:34:13 +02:00
AsamK
8c1b5d54f7 Reduce log output of third party libs
Fixes #1064
2023-05-21 11:49:26 +02:00
AsamK
8a0005d900 Remove unused code 2023-05-21 11:18:18 +02:00
AsamK
a754eb6faf Better logging for registration failure 2023-05-21 11:15:49 +02:00
AsamK
c9082a63f0 Update user agent version 2023-05-21 11:05:59 +02:00
AsamK
314b3cafbb Refactor selfNumber in send command 2023-05-20 13:01:54 +02:00
AsamK
91700ce995 Implement textStyles for sending and receiving
Fixes #1250
2023-05-20 12:49:57 +02:00
AsamK
8a31b7f2c1 Implement editing of previous messages 2023-05-11 19:10:29 +02:00
AsamK
842f13b2fc Update libsignal-service-java 2023-04-16 21:19:17 +02:00
AsamK
9f60ed534a Implement support for usernames 2023-04-03 19:00:05 +02:00
AsamK
03f193b34c Fix deleting old group in dbus mode
Fixes #1192
2023-04-02 19:25:49 +02:00
signals-from-outer-space
db42f61cbb Added missing file attachment attributes in JsonAttachment output
Closes #1217
Fixes #1216
2023-04-02 18:49:42 +02:00
AsamK
276ecef300 Update libsignal-service-java
- Use session based number verification and registration
2023-04-01 12:19:53 +02:00
cedb
15630356e1 Change content-type check to check contains
So far it was doing an equals check, but a string like "application/json; charset=utf-8"
is similarly valid. And some clients like OkHttp actually automatically add the
charset.

Closes #1152
2023-03-03 18:11:56 +01:00
AsamK
3206639778 Scrub E164 in dbus path
Related #1189
2023-02-19 20:18:05 +01:00
AsamK
15da210de7 Print text styles in plain text output 2023-01-27 21:46:39 +01:00
AsamK
210466e7d9 Allow JSON-RPC commands without account param if only one account exists 2022-12-30 13:50:40 +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
5771bb858f Allow using data URIs for updateGroup/updateProfile avatars
Fixes #1082
2022-11-14 19:31:40 +01:00
AsamK
e6cf11cb3d Add missing check to httpAddres 2022-11-03 15:10:17 +01:00
AsamK
a780be70dd Add http endpoint events with SSE 2022-11-03 00:03:37 +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
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