added username support to /v2/send endpoint

This commit is contained in:
Bernhard B
2024-05-22 19:21:22 +02:00
parent 07a3beaa97
commit bbd088fc0b
7 changed files with 147 additions and 127 deletions

View File

@@ -0,0 +1,44 @@
package data
import (
"fmt"
)
type RecpType int
const (
Number RecpType = iota + 1
Username
Group
)
type MessageMention struct {
Start int64 `json:"start"`
Length int64 `json:"length"`
Author string `json:"author"`
}
func (s *MessageMention) ToString() string {
return fmt.Sprintf("%d:%d:%s", s.Start, s.Length, s.Author)
}
type SendMessageRecipient struct {
Identifier string `json:"identifier"`
Type string `json:"type"`
}
type SignalCliSendRequest struct {
Number string
Message string
Recipients []string
Base64Attachments []string
RecipientType RecpType
Sticker string
Mentions []MessageMention
QuoteTimestamp *int64
QuoteAuthor *string
QuoteMessage *string
QuoteMentions []MessageMention
TextMode *string
EditTimestamp *int64
}