Skip to content

Commit

Permalink
Merge pull request #612 from ahatius/master
Browse files Browse the repository at this point in the history
Add notify-self-flag support for json-rpc mode
  • Loading branch information
bbernhard authored Nov 11, 2024
2 parents 6e78758 + 7cfc53c commit 3344268
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit 3344268

Please sign in to comment.