fix bug in update profile REST API command

* use 'given-name' parameter instead of 'name'

see #236
This commit is contained in:
Bernhard B
2022-04-08 19:24:35 +02:00
parent c4b5f900f9
commit ab4934832a

View File

@@ -1022,7 +1022,7 @@ func (s *SignalClient) UpdateProfile(number string, profileName string, base64Av
if s.signalCliMode == JsonRpc {
type Request struct {
Name string `json:"name"`
Name string `json:"given-name"`
Avatar string `json:"avatar,omitempty"`
RemoveAvatar bool `json:"remove-avatar"`
}
@@ -1039,7 +1039,7 @@ func (s *SignalClient) UpdateProfile(number string, profileName string, base64Av
}
_, err = jsonRpc2Client.getRaw("updateProfile", request)
} else {
cmd := []string{"--config", s.signalCliConfig, "-a", number, "updateProfile", "--name", profileName}
cmd := []string{"--config", s.signalCliConfig, "-a", number, "updateProfile", "--given-name", profileName}
if base64Avatar == "" {
cmd = append(cmd, "--remove-avatar")
} else {