Include version in legacy requests

This commit is contained in:
Finn 2021-06-24 18:18:14 -07:00
parent 6ed4784138
commit 0e612a2e15
3 changed files with 5 additions and 3 deletions

View file

@ -38,7 +38,7 @@ var (
Short: "create a local account by linking to an existing Signal account",
Run: func(_ *cobra.Command, _ []string) {
requestID := signald.GenerateID()
err := common.Signald.RawRequest(v0.LegacyRequest{Type: "link", ID: requestID})
err := common.Signald.RawRequest(v0.LegacyRequest{Type: "link", ID: requestID, Version: "v0"})
if err != nil {
log.Fatal("error sending request: ", err)
}

View file

@ -36,8 +36,9 @@ var (
Run: func(_ *cobra.Command, _ []string) {
requestID := signald.GenerateID()
err := common.Signald.RawRequest(v0.LegacyRequest{
Type: "list_accounts",
ID: requestID,
Type: "list_accounts",
ID: requestID,
Version: "v0",
})
if err != nil {
log.Fatal("error sending request: ", err)

View file

@ -33,6 +33,7 @@ type LegacyRequest struct {
Members []string `json:"members,omitempty"`
Avatar string `json:"avatar,omitempty"`
Captcha string `json:"captcha,omitempty"`
Version string `json:"version,omitempty"`
}
type JsonAddress struct {