Commit Graph

583 Commits

Author SHA1 Message Date
Bernhard B
b45aab70a7 improved REST API documentation 2023-10-07 11:29:41 +02:00
Bernhard B
9e09775d94 implemented "sendContacts" functionality
see #416
2023-10-07 11:18:16 +02:00
Bernhard B
07aee21672 handle multicharacter emojis in textstyleparser
see #413
2023-10-06 19:11:07 +02:00
Bernhard B
8271d53746 fixed small bug in cli client 2023-10-05 21:16:40 +02:00
Bernhard B
bc74d4cb48 add debug logging to cli client
* log the stdout & stderr buffers in case debug logging is enabled.

see #412
2023-10-05 18:02:57 +02:00
Bernhard B
6f269d3e1d improved error handling in send method
* when a message is successfully sent, signal-cli returns a timestamp,
  which we convert to an integer. in case, we, for some reason can't
  convert the timestamp to an integer, it means that signal-cli returned
  some non-numeric characters as well (which is a strong indication that
  there was an error). So, instead of returning the parsing error,
  return the actual signal-cli error message.

see #412
2023-10-04 20:44:42 +02:00
Bernhard B
661fe568e2 json-rpc mode: fixed bug in group deletion
* deleting a group in json-rpc mode didn't work.

see #387
2023-10-04 19:07:17 +02:00
Bernhard B
b39980e66b added possibility to update the group description & the avatar
see #417
2023-10-03 19:49:36 +02:00
Bernhard B
2474238cb5 fixed typo in struct definition 2023-10-03 19:29:26 +02:00
Bernhard B
fc2982c25f fixed crash in create group request
see #410
2023-10-03 19:28:26 +02:00
Bernhard B
08959a9d69 fixed signal-cli-native version 2023-10-02 21:37:20 +02:00
Bernhard B
6123cbb4c3 updated libsignal-client to v0.32.1 2023-10-02 20:39:57 +02:00
Bernhard B
3ca898196e improved error checking in Dockerfile 2023-10-02 20:39:16 +02:00
Bernhard B
31048fd6a3 updated signal-cli to version 0.12.2 2023-10-02 20:38:57 +02:00
Bernhard B
f18ebde951 fixed signal-cli-native build
* due to different glibc versions, it is not possible to use the
  existing (prebuilt) libsignal_jni.so that get's shipped with the
  signal-cli binary distribution for the signal-cli native image build.
  So in order to make that work (again), we need to use our own
  libsignal_jni.so for the x86_64 build.

see #412
2023-10-02 19:03:52 +02:00
Bernhard B
db005cdcc3 updated GraalVM to fix broken native image build 2023-09-29 19:42:02 +02:00
Bernhard B
4f3ebf0bfc fixed bug in create group endpoint
link & permissions weren't correctly set

see #410
2023-09-26 22:30:43 +02:00
Bernhard B
f21925ea74 updated filepath-securejoin to v0.2.4 to fix a potential security issue
on windows
2023-09-23 19:00:54 +02:00
Bernhard B
76026e9c5c Merge branch 'master' of github.com:bbernhard/signal-cli-rest-api 2023-09-23 18:58:16 +02:00
Bernhard B
221e129ad4 added strikethrough and monspace text styling options
see #382
2023-09-23 18:57:32 +02:00
Bernhard B
e8bea4b477 Merge pull request #405 from greysonp/add-group-refresh
Add the ability to refresh a group.
2023-09-19 22:42:15 +02:00
Greyson Parrelli
4eaf9a971b Update to a PUT request. 2023-09-09 08:00:33 -04:00
Bernhard B
35e2e903df made qrcode version configureable via query parameter (e.g
?qrcode_version=11)

see #402
2023-09-08 22:45:50 +02:00
Bernhard B
1ba1418e14 Merge branch 'master' of github.com:bbernhard/signal-cli-rest-api 2023-09-08 19:55:01 +02:00
Bernhard B
a5cbb4c725 fixed bug in textstyleparser
* bold text wasn't correctly parsed

see #382
2023-09-08 19:54:05 +02:00
Greyson Parrelli
6ec00f4589 Add the ability to refresh a group. 2023-09-06 00:59:14 -04:00
Bernhard B
06744e9706 Merge pull request #404 from tactilenews/fix-403
fix: include $stdin in server response on error
2023-09-05 20:45:17 +02:00
Robert Schäfer
7aa1fddcd8 fix: include $stdin in server response on error
Motivation
----------
The way how I fixed this is that both `Stdout` and `Stderr` are responded back to the client.

I don't think it's good practice to discard `$stderr` on success and to discard `$stdout` on error.

Let me know what you think. I'm still very new to Golang.

How to test
-----------
1. First of all you must be able to reproduce "CAPTCHA proof required" error (I guess you need to send a lot of messages to the same number)
2. Execute:
```
curl -X POST -H "Content-Type: application/json" 'http://localhost:8080/v2/send' \
       -d '{"message": "Test via Signal API!", "number": "<SENDER_PHONE_NUMBER>", "recipients": [ "<RECIPIENT_PHONE_NUMBER>" ]}
'
```
3. See in the JSON response:
```
{"error":"Failed to send (some) messages:\n+49176xxxxxxxx: CAPTCHA proof required for sending to \"+49176xxxxxxxx\", available options \"RECAPTCHA, PUSH_CHALLENGE\" with challenge token \"1f209ee0-d487-4efc-xxxx-xxxxxxxxxxxx\", or wait \"86400\" seconds.\nTo get the captcha token, go to https://signalcaptchas.org/challenge/generate.html\nCheck the developer tools (F12) console for a failed redirect to signalcaptcha://\nEverything after signalcaptcha:// is the captcha token.\nUse the following command to submit the captcha token:\nsignal-cli submitRateLimitChallenge --challenge CHALLENGE_TOKEN --captcha CAPTCHA_TOKEN\nxxxxxxxxxxxxx\nFailed to send message\n"}
```

fix #403
2023-09-04 16:13:04 +02:00
Bernhard B
e0e49dcbd4 Merge pull request #401 from k-bx/master
Accept max_messages param
2023-08-31 23:16:24 +02:00
Bernhard B
1380b8ebce Merge pull request #400 from testwill/typo
fix: regularly typo
2023-08-31 19:30:00 +02:00
Bernhard B
d68f755ee5 Merge pull request #399 from developersteve/master
Update README.md
2023-08-31 19:29:06 +02:00
Kostia Rybnikov
068a124a1a Accept max_messages param 2023-08-31 10:36:52 +03:00
Kostia Rybnikov
c26d83583b Upgrade signal cli to 0.12.1 2023-08-31 10:36:36 +03:00
guangwu
936e1c3dd8 fix: regularly typo 2023-08-31 09:55:18 +08:00
developersteve
53d6f52f57 Update README.md
added details about the port env var being set
2023-08-24 21:02:13 +10:00
Bernhard B
c6d065980f updated libsignal-client to v0.30.0 2023-08-23 18:49:25 +02:00
Bernhard B
bd18ecb86c updated signal-cli to version 0.12.0 2023-08-23 18:06:10 +02:00
Bernhard B
2bcfccdfda Merge branch 'master' of github.com:bbernhard/signal-cli-rest-api 2023-08-21 20:04:58 +02:00
Bernhard B
759ba197a1 fixed bug in textstyleparser + added unittests 2023-08-21 20:04:28 +02:00
Bernhard B
c12a0c0726 Merge pull request #392 from developersteve/master-1
Update HOMEASSISTANT.md
2023-08-21 19:08:59 +02:00
Bernhard B
a332215a9e added text formatting (bold & italic) to json-rpc mode 2023-08-21 18:43:15 +02:00
Bernhard B
2f6bbec3e9 added text formatting (bold & italic) for normal/native mode 2023-08-21 18:38:38 +02:00
developersteve
85439ef893 Update HOMEASSISTANT.md
Added a trouble shooting note for linking an account to the api
2023-08-13 13:54:07 +10:00
Bernhard B
2519d83ac7 fixed signal-cli-native version in Dockerfile 2023-06-08 21:07:43 +02:00
Bernhard B
b148eb90d3 updated go.mod 2023-06-08 20:21:47 +02:00
Bernhard B
d13c161160 updated golang to v1.20 2023-06-08 19:53:05 +02:00
Bernhard B
540ca2fef6 updated go-gin to v1.9.1 2023-06-08 19:44:54 +02:00
Bernhard B
793048f935 updated signal-cli-native package for arm64 to v0.11.11+1 2023-06-08 19:42:01 +02:00
Bernhard B
4dc19813b6 fixed bug in search endpoint
* when multiple accounts are registered, signal-cli expects the account
  specified with '-a'. In order to stay backwards compatible, the search
  endpoint was extended with an optional number parameter. i.e:
  '/search/{number}'. In case only one account is registered, the number
  parameter can be omitted.

see #369
2023-05-26 18:09:06 +02:00
Bernhard B
d8ded891a1 updated graalvm to version 22.3.0 2023-05-25 21:20:51 +02:00