From 3e33f0a3f7ee932f991b9faa1a02f29a4f5e4bdf Mon Sep 17 00:00:00 2001 From: finn Date: Mon, 29 Aug 2022 11:57:38 -0700 Subject: [PATCH] add --overwrite option to signaldctl account link --- cmd/signaldctl/cmd/account/link/link-account.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/signaldctl/cmd/account/link/link-account.go b/cmd/signaldctl/cmd/account/link/link-account.go index 899815d..9cb3fa3 100644 --- a/cmd/signaldctl/cmd/account/link/link-account.go +++ b/cmd/signaldctl/cmd/account/link/link-account.go @@ -34,6 +34,7 @@ import ( var ( testing bool deviceName string + overwrite bool LinkAccountCmd = &cobra.Command{ Use: "link", @@ -80,6 +81,7 @@ var ( finishReq := v1.FinishLinkRequest{ DeviceName: deviceName, SessionId: response.SessionId, + Overwrite: overwrite, } _, err = finishReq.Submit(common.Signald) @@ -99,4 +101,5 @@ func init() { } LinkAccountCmd.Flags().BoolVarP(&testing, "testing", "t", false, "use the Signal testing server") LinkAccountCmd.Flags().StringVarP(&deviceName, "device-name", "n", name, "the name of this device. shown to other devices on the signal account") + LinkAccountCmd.Flags().BoolVar(&overwrite, "overwrite", false, "if an account with the same id already exists in signald's database, delete it before linking") }