mirror of
https://github.com/bbernhard/signal-cli-rest-api.git
synced 2026-05-30 15:24:15 +00:00
added text formatting (bold & italic) to json-rpc mode
This commit is contained in:
parent
2f6bbec3e9
commit
a332215a9e
@ -351,6 +351,7 @@ func (s *SignalClient) send(number string, message string,
|
|||||||
QuoteAuthor *string `json:"quote-author,omitempty"`
|
QuoteAuthor *string `json:"quote-author,omitempty"`
|
||||||
QuoteMessage *string `json:"quote-message,omitempty"`
|
QuoteMessage *string `json:"quote-message,omitempty"`
|
||||||
QuoteMentions []string `json:"quote-mentions,omitempty"`
|
QuoteMentions []string `json:"quote-mentions,omitempty"`
|
||||||
|
TextStyles []string `json:"text-style,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
request := Request{Message: message}
|
request := Request{Message: message}
|
||||||
@ -384,6 +385,10 @@ func (s *SignalClient) send(number string, message string,
|
|||||||
request.QuoteMentions = nil
|
request.QuoteMentions = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(signalCliTextFormatStrings) > 0 {
|
||||||
|
request.TextStyles = signalCliTextFormatStrings
|
||||||
|
}
|
||||||
|
|
||||||
rawData, err := jsonRpc2Client.getRaw("send", request)
|
rawData, err := jsonRpc2Client.getRaw("send", request)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
cleanupAttachmentEntries(attachmentEntries)
|
cleanupAttachmentEntries(attachmentEntries)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user