mirror of
https://github.com/aljazceru/signal-cli-rest-api.git
synced 2026-01-23 16:54:28 +01:00
Add support for read receipts on /receive
This commit is contained in:
@@ -720,7 +720,7 @@ func (s *SignalClient) SendV2(number string, message string, recps []string, bas
|
||||
return ×tamps, nil
|
||||
}
|
||||
|
||||
func (s *SignalClient) Receive(number string, timeout int64, ignoreAttachments bool, ignoreStories bool, maxMessages int64) (string, error) {
|
||||
func (s *SignalClient) Receive(number string, timeout int64, ignoreAttachments bool, ignoreStories bool, maxMessages int64, sendReadReceipts bool) (string, error) {
|
||||
if s.signalCliMode == JsonRpc {
|
||||
return "", errors.New("Not implemented")
|
||||
} else {
|
||||
@@ -739,6 +739,10 @@ func (s *SignalClient) Receive(number string, timeout int64, ignoreAttachments b
|
||||
command = append(command, strconv.FormatInt(maxMessages, 10))
|
||||
}
|
||||
|
||||
if sendReadReceipts {
|
||||
command = append(command, "--send-read-receipts")
|
||||
}
|
||||
|
||||
out, err := s.cliClient.Execute(true, command, "")
|
||||
if err != nil {
|
||||
return "", err
|
||||
|
||||
Reference in New Issue
Block a user