add --overwrite option to signaldctl account link
This commit is contained in:
parent
5470eb90d9
commit
3e33f0a3f7
1 changed files with 3 additions and 0 deletions
|
@ -34,6 +34,7 @@ import (
|
||||||
var (
|
var (
|
||||||
testing bool
|
testing bool
|
||||||
deviceName string
|
deviceName string
|
||||||
|
overwrite bool
|
||||||
|
|
||||||
LinkAccountCmd = &cobra.Command{
|
LinkAccountCmd = &cobra.Command{
|
||||||
Use: "link",
|
Use: "link",
|
||||||
|
@ -80,6 +81,7 @@ var (
|
||||||
finishReq := v1.FinishLinkRequest{
|
finishReq := v1.FinishLinkRequest{
|
||||||
DeviceName: deviceName,
|
DeviceName: deviceName,
|
||||||
SessionId: response.SessionId,
|
SessionId: response.SessionId,
|
||||||
|
Overwrite: overwrite,
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = finishReq.Submit(common.Signald)
|
_, 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().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().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")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue