Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notify-self-flag support for json-rpc mode #612

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading