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", Short: "create a local account by linking to an existing Signal account",
Run: func(_ *cobra.Command, _ []string) { Run: func(_ *cobra.Command, _ []string) {
requestID := signald.GenerateID() 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 { if err != nil {
log.Fatal("error sending request: ", err) log.Fatal("error sending request: ", err)
} }

View file

@ -38,6 +38,7 @@ var (
err := common.Signald.RawRequest(v0.LegacyRequest{ err := common.Signald.RawRequest(v0.LegacyRequest{
Type: "list_accounts", Type: "list_accounts",
ID: requestID, ID: requestID,
Version: "v0",
}) })
if err != nil { if err != nil {
log.Fatal("error sending request: ", err) log.Fatal("error sending request: ", err)

View file

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