mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-10-31 09:39:44 +00:00
fixed bug in json-rpc mode
* first argument that is passed to the syscall.Exec needs to be the name of the executable. Since it was "--output=json" before, this string was used as the executable's name and not as argument. Therefore it was silently swallowed. see #892
This commit is contained in:
parent
80e0f34032
commit
72580cdef5
@ -25,8 +25,6 @@ func main() {
|
||||
var tcpPort int64 = 6001
|
||||
jsonRpc2ClientConfig.AddEntry(utils.MULTI_ACCOUNT_NUMBER, utils.JsonRpc2ClientConfigEntry{TcpPort: tcpPort})
|
||||
|
||||
args := []string{"--output=json", "--config", signalCliConfigDir}
|
||||
|
||||
signalCliBinary := "signal-cli"
|
||||
signalMode := utils.GetEnv("MODE", "json-rpc")
|
||||
if signalMode == "json-rpc-native" {
|
||||
@ -35,6 +33,8 @@ func main() {
|
||||
log.Fatal("The mode needs to be either 'json-rpc' or 'json-rpc-native'")
|
||||
}
|
||||
|
||||
args := []string{signalCliBinary, "--output", "json", "--config", signalCliConfigDir}
|
||||
|
||||
trustNewIdentitiesEnv := utils.GetEnv("JSON_RPC_TRUST_NEW_IDENTITIES", "")
|
||||
if trustNewIdentitiesEnv == "on-first-use" {
|
||||
args = append(args, []string{"--trust-new-identities", "on-first-use"}...)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user