add --overwrite option to signaldctl account link

This commit is contained in:
finn 2022-08-29 11:57:38 -07:00
parent 5470eb90d9
commit 3e33f0a3f7

View file

@ -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")
}