mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-05-23 14:14:16 +00:00
Merge pull request #612 from ahatius/master
Add notify-self-flag support for json-rpc mode
This commit is contained in:
commit
3344268a59
@ -461,7 +461,10 @@ func (s *SignalClient) send(signalCliSendRequest ds.SignalCliSendRequest) (*Send
|
|||||||
request.Attachments = append(request.Attachments, attachmentEntry.toDataForSignal())
|
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
|
request.Sticker = signalCliSendRequest.Sticker
|
||||||
if signalCliSendRequest.Mentions != nil {
|
if signalCliSendRequest.Mentions != nil {
|
||||||
@ -1396,9 +1399,9 @@ func (s *SignalClient) UpdateProfile(number string, profileName string, base64Av
|
|||||||
|
|
||||||
if s.signalCliMode == JsonRpc {
|
if s.signalCliMode == JsonRpc {
|
||||||
type Request struct {
|
type Request struct {
|
||||||
Name string `json:"given-name"`
|
Name string `json:"given-name"`
|
||||||
Avatar string `json:"avatar,omitempty"`
|
Avatar string `json:"avatar,omitempty"`
|
||||||
RemoveAvatar bool `json:"remove-avatar"`
|
RemoveAvatar bool `json:"remove-avatar"`
|
||||||
About *string `json:"about,omitempty"`
|
About *string `json:"about,omitempty"`
|
||||||
}
|
}
|
||||||
request := Request{Name: profileName}
|
request := Request{Name: profileName}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user