mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2025-12-19 07:34:23 +01:00
Add notify-self-flag support for json-rpc mode
This commit is contained in:
@@ -461,7 +461,10 @@ func (s *SignalClient) send(signalCliSendRequest ds.SignalCliSendRequest) (*Send
|
||||
request.Attachments = append(request.Attachments, attachmentEntry.toDataForSignal())
|
||||
}
|
||||
|
||||
request.NotifySelf = true
|
||||
// for backwards compatibility, if flag is not set we'll assume that self notification is desired
|
||||
if signalCliSendRequest.NotifySelf == nil || *signalCliSendRequest.NotifySelf {
|
||||
request.NotifySelf = true
|
||||
}
|
||||
|
||||
request.Sticker = signalCliSendRequest.Sticker
|
||||
if signalCliSendRequest.Mentions != nil {
|
||||
@@ -1396,9 +1399,9 @@ func (s *SignalClient) UpdateProfile(number string, profileName string, base64Av
|
||||
|
||||
if s.signalCliMode == JsonRpc {
|
||||
type Request struct {
|
||||
Name string `json:"given-name"`
|
||||
Avatar string `json:"avatar,omitempty"`
|
||||
RemoveAvatar bool `json:"remove-avatar"`
|
||||
Name string `json:"given-name"`
|
||||
Avatar string `json:"avatar,omitempty"`
|
||||
RemoveAvatar bool `json:"remove-avatar"`
|
||||
About *string `json:"about,omitempty"`
|
||||
}
|
||||
request := Request{Name: profileName}
|
||||
|
||||
Reference in New Issue
Block a user