Commit Graph

762 Commits

Author SHA1 Message Date
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
Bernhard B
a9a32ff784 bumped signal-cli to version 0.11.11 & added libsignal-client v0.25.0 2023-05-25 17:38:42 +02:00
Bernhard B
3dcb8985cd bumped signal-cli in Dockerfile to version 0.11.10 + added
libsignalclient v0.23.1 for x86-64 and armv7
2023-05-24 18:55:32 +02:00
Bernhard B
99c760df66 handle non existing accounts.json gracefully
see #363
2023-05-16 21:26:26 +02:00
Bernhard B
0dd742cb23 extended receive endpoint + AUTO_RECEIVE_SCHEDULE functionality
* added timeout, ignore_attachments and ignore_stories query parameter
  to receive endpoint.

* added AUTO_RECEIVE_SCHEDULE_RECEIVE_TIMEOUT,
  AUTO_RECEIVE_SCHEDULE_IGNORE_ATTACHMENTS and
  AUTO_RECEIVE_SCHEDULE_IGNORE_STORIES environment variables to the
  AUTO_RECEIVE_SCHEDULE functionality.

see #365
2023-05-14 21:21:38 +02:00
Bernhard B
99da94d048 consider linked number in AUTO_RECEIVE_SCHEDULE
* up to now, linked numbers weren't considered in the
  AUTO_RECEIVE_SCHEDULE.

see #363
2023-05-11 20:49:23 +02:00
Bernhard B
b98f4cf3f9 Merge branch 'master' of github.com:bbernhard/signal-cli-rest-api 2023-05-07 21:55:06 +02:00
Bernhard B
82ea3ae1c8 updated signal-cli to version 0.11.9.1-2 2023-05-07 21:01:29 +02:00
Bernhard B
11da8f867d Update README.md
* added link to blog post from @asad-awadia
2023-04-28 21:07:06 +02:00
Bernhard B
0870dc6d04 Merge pull request #353 from Matovidlo/stickers
Add stickers support in API and client
2023-04-18 21:24:35 +02:00
Martin Vasko
19c2f85c03 add stickers support in API and client 2023-04-05 14:37:27 +02:00
Bernhard B
5130282dc4 updated all golang dependencies 2023-03-05 23:15:59 +01:00
Bernhard B
bf849d04af Merge branch 'master' of github.com:bbernhard/signal-cli-rest-api 2023-03-05 23:12:06 +01:00
Bernhard B
d571927fa2 updated signal-cli to version 0.11.7 2023-03-05 23:11:35 +01:00
Bernhard B
33c19a4fed added libsignal-client v0.22.0 2023-03-05 23:10:13 +01:00
Bernhard B
a680e163ae Merge pull request #348 from joopdo/joopdo-patch-1
Documentation proposal
2023-03-03 16:48:34 +01:00
Joop
5c7bfcd283 Update HOMEASSISTANT.md 2023-03-03 13:23:31 +01:00
Joop
b656788573 Update HOMEASSISTANT.md
Adding a description on how signal-cli-rest-api can trigger automations in Home Assistant. (Sending messages to Signal to trigger events)
2023-03-03 08:48:07 +01:00
Joop
3a791502bb Update HOMEASSISTANT.md
Adding a description on how signal-cli-rest-api can trigger automations in Home Assistant. (Sending messages to Signal to trigger events)
2023-03-02 15:31:23 +01:00
Bernhard B
7cee836b20 do not hardcode signal-cli-native for ARM, but download it from the repo instead 2023-02-14 20:00:25 +01:00
Bernhard B
c919d96a4f Merge pull request #337 from brozikcz/master
Remove disabling of native mode for aarch64
2023-02-14 19:49:00 +01:00
Bernhard B
e31c85d394 Merge pull request #339 from bbernhard/dependabot/go_modules/src/github.com/gin-gonic/gin-1.7.7
Bump github.com/gin-gonic/gin from 1.7.0 to 1.7.7 in /src
2023-02-11 18:58:44 +01:00