Skip to content

Commit 3344268

Browse files
authored
Merge pull request #612 from ahatius/master
Add notify-self-flag support for json-rpc mode
2 parents 6e78758 + 7cfc53c commit 3344268

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/client/client.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,10 @@ func (s *SignalClient) send(signalCliSendRequest ds.SignalCliSendRequest) (*Send
461461
request.Attachments = append(request.Attachments, attachmentEntry.toDataForSignal())
462462
}
463463

464-
request.NotifySelf = true
464+
// for backwards compatibility, if flag is not set we'll assume that self notification is desired
465+
if signalCliSendRequest.NotifySelf == nil || *signalCliSendRequest.NotifySelf {
466+
request.NotifySelf = true
467+
}
465468

466469
request.Sticker = signalCliSendRequest.Sticker
467470
if signalCliSendRequest.Mentions != nil {
@@ -1396,9 +1399,9 @@ func (s *SignalClient) UpdateProfile(number string, profileName string, base64Av
13961399

13971400
if s.signalCliMode == JsonRpc {
13981401
type Request struct {
1399-
Name string `json:"given-name"`
1400-
Avatar string `json:"avatar,omitempty"`
1401-
RemoveAvatar bool `json:"remove-avatar"`
1402+
Name string `json:"given-name"`
1403+
Avatar string `json:"avatar,omitempty"`
1404+
RemoveAvatar bool `json:"remove-avatar"`
14021405
About *string `json:"about,omitempty"`
14031406
}
14041407
request := Request{Name: profileName}

0 commit comments

Comments
 (0)